mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 06:18:21 +02:00
Convert remainder of ShellError variants to named fields (#11276)
# Description Removed variants that are no longer in use: * `NoFile*` * `UnexpectedAbbrComponent` Converted: * `OutsideSpannedLabeledError` * `EvalBlockWithInput` * `Break` * `Continue` * `Return` * `NotAConstant` * `NotAConstCommand` * `NotAConstHelp` * `InvalidGlobPattern` * `ErrorExpandingGlob` Fixes #10700 # User-Facing Changes None # Tests + Formatting - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting N/A
This commit is contained in:
@ -108,7 +108,10 @@ impl Command for Du {
|
||||
let exclude = args.exclude.map_or(Ok(None), move |x| {
|
||||
Pattern::new(&x.item)
|
||||
.map(Some)
|
||||
.map_err(|e| ShellError::InvalidGlobPattern(e.msg.to_string(), x.span))
|
||||
.map_err(|e| ShellError::InvalidGlobPattern {
|
||||
msg: e.msg.into(),
|
||||
span: x.span,
|
||||
})
|
||||
})?;
|
||||
|
||||
let include_files = args.all;
|
||||
|
Reference in New Issue
Block a user