forked from extern/nushell
Remove usages of Call::positional_nth
(#12871)
# Description Following from #12867, this PR replaces usages of `Call::positional_nth` with existing spans. This removes several `expect`s from the code. Also remove unused `positional_nth_mut` and `positional_iter_mut`
This commit is contained in:
@@ -784,10 +784,7 @@ fn heavy_lifting(code: Value, escape: bool, osc: bool, call: &Call) -> Result<St
|
||||
None => {
|
||||
return Err(ShellError::TypeMismatch {
|
||||
err_message: String::from("Unknown ansi code"),
|
||||
span: call
|
||||
.positional_nth(0)
|
||||
.expect("Unexpected missing argument")
|
||||
.span,
|
||||
span: code.span(),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user