diff --git a/crates/nu-protocol/src/errors/labeled_error.rs b/crates/nu-protocol/src/errors/labeled_error.rs index 7104a1a8b1..810ec5a880 100644 --- a/crates/nu-protocol/src/errors/labeled_error.rs +++ b/crates/nu-protocol/src/errors/labeled_error.rs @@ -1,4 +1,4 @@ -use super::ShellError; +use super::{shell_error::io::IoError, ShellError}; use crate::Span; use miette::Diagnostic; use serde::{Deserialize, Serialize}; @@ -247,3 +247,9 @@ impl From for LabeledError { LabeledError::from_diagnostic(&err) } } + +impl From for LabeledError { + fn from(err: IoError) -> Self { + LabeledError::from_diagnostic(&err) + } +}