mirror of
https://github.com/nushell/nushell.git
synced 2025-07-01 15:11:52 +02:00
Convert Shellerror::GenericError
to named fields (#11230)
# Description Replace `.to_string()` used in `GenericError` with `.into()` as `.into()` seems more popular Replace `Vec::new()` used in `GenericError` with `vec![]` as `vec![]` seems more popular (There are so, so many)
This commit is contained in:
@ -119,13 +119,13 @@ impl Command for Mktemp {
|
||||
})?
|
||||
}
|
||||
Err(e) => {
|
||||
return Err(ShellError::GenericError(
|
||||
format!("{}", e),
|
||||
format!("{}", e),
|
||||
None,
|
||||
None,
|
||||
Vec::new(),
|
||||
));
|
||||
return Err(ShellError::GenericError {
|
||||
error: format!("{}", e),
|
||||
msg: format!("{}", e),
|
||||
span: None,
|
||||
help: None,
|
||||
inner: vec![],
|
||||
});
|
||||
}
|
||||
};
|
||||
Ok(PipelineData::Value(Value::string(res, span), None))
|
||||
|
Reference in New Issue
Block a user