Skip to content

Commit

Permalink
remove deprecated warnings (nushell#14386)
Browse files Browse the repository at this point in the history
# Description
While looking into nushell deprecated relative code, I found `str
contains` have some warnings, but it should be removed.
  • Loading branch information
WindSoilder authored Nov 19, 2024
1 parent d69e131 commit 9cffbdb
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions crates/nu-command/src/strings/str_/contains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@ impl Command for SubCommand {
call: &Call,
input: PipelineData,
) -> Result<PipelineData, ShellError> {
if call.has_flag_const(working_set, "not")? {
nu_protocol::report_shell_error(
working_set.permanent(),
&ShellError::GenericError {
error: "Deprecated option".into(),
msg: "`str contains --not {string}` is deprecated and will be removed in 0.95."
.into(),
span: Some(call.head),
help: Some("Please use the `not` operator instead.".into()),
inner: vec![],
},
);
}

let cell_paths: Vec<CellPath> = call.rest_const(working_set, 1)?;
let cell_paths = (!cell_paths.is_empty()).then_some(cell_paths);
let args = Arguments {
Expand Down

0 comments on commit 9cffbdb

Please sign in to comment.