From 9cffbdb42ac90055754e36b23afc6368e34e2983 Mon Sep 17 00:00:00 2001 From: Wind Date: Tue, 19 Nov 2024 21:52:58 +0800 Subject: [PATCH] remove deprecated warnings (#14386) # Description While looking into nushell deprecated relative code, I found `str contains` have some warnings, but it should be removed. --- crates/nu-command/src/strings/str_/contains.rs | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/crates/nu-command/src/strings/str_/contains.rs b/crates/nu-command/src/strings/str_/contains.rs index de91768e76..d24fac6668 100644 --- a/crates/nu-command/src/strings/str_/contains.rs +++ b/crates/nu-command/src/strings/str_/contains.rs @@ -77,20 +77,6 @@ impl Command for SubCommand { call: &Call, input: PipelineData, ) -> Result { - 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 = call.rest_const(working_set, 1)?; let cell_paths = (!cell_paths.is_empty()).then_some(cell_paths); let args = Arguments {