mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 09:35:44 +02:00
Refactor: Construct IoError
from std::io::Error
instead of std::io::ErrorKind
(#15777)
This commit is contained in:
@ -20,6 +20,7 @@ use nu_protocol::{
|
||||
Spanned, Value,
|
||||
ast::{Math, Operator},
|
||||
engine::Closure,
|
||||
shell_error,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use std::{
|
||||
@ -87,7 +88,7 @@ fn manager_consume_all_exits_after_streams_and_interfaces_are_dropped() -> Resul
|
||||
|
||||
fn test_io_error() -> ShellError {
|
||||
ShellError::Io(IoError::new_with_additional_context(
|
||||
std::io::ErrorKind::Other,
|
||||
shell_error::io::ErrorKind::from_std(std::io::ErrorKind::Other),
|
||||
Span::test_data(),
|
||||
None,
|
||||
"test io error",
|
||||
|
@ -190,11 +190,7 @@ impl PersistentPlugin {
|
||||
|
||||
// Start the plugin garbage collector
|
||||
let gc = PluginGc::new(mutable.gc_config.clone(), &self).map_err(|err| {
|
||||
IoError::new_internal(
|
||||
err.kind(),
|
||||
"Could not start plugin gc",
|
||||
nu_protocol::location!(),
|
||||
)
|
||||
IoError::new_internal(err, "Could not start plugin gc", nu_protocol::location!())
|
||||
})?;
|
||||
|
||||
let pid = child.id();
|
||||
|
Reference in New Issue
Block a user