diff --git a/crates/nu-cmd-extra/src/extra/strings/str_/mod.rs b/crates/nu-cmd-extra/src/extra/strings/str_/mod.rs index 61fccfff69..481b440e3a 100644 --- a/crates/nu-cmd-extra/src/extra/strings/str_/mod.rs +++ b/crates/nu-cmd-extra/src/extra/strings/str_/mod.rs @@ -1,3 +1 @@ pub(crate) mod case; - -pub use case::*; diff --git a/crates/nu-command/src/strings/parse.rs b/crates/nu-command/src/strings/parse.rs index ceaec0fc2b..186db1886a 100644 --- a/crates/nu-command/src/strings/parse.rs +++ b/crates/nu-command/src/strings/parse.rs @@ -321,9 +321,7 @@ impl Iterator for ParseStreamer { } } - let Some(v) = self.stream.next() else { - return None; - }; + let v = self.stream.next()?; let Ok(s) = v.as_string() else { return Some(Value::error( diff --git a/crates/nu-command/src/strings/str_/index_of.rs b/crates/nu-command/src/strings/str_/index_of.rs index 604c1c6b8a..d5f5d198d5 100644 --- a/crates/nu-command/src/strings/str_/index_of.rs +++ b/crates/nu-command/src/strings/str_/index_of.rs @@ -27,9 +27,6 @@ impl CmdArgument for Arguments { #[derive(Clone)] pub struct SubCommand; -#[derive(Clone)] -pub struct IndexOfOptionalBounds(i32, i32); - impl Command for SubCommand { fn name(&self) -> &str { "str index-of" diff --git a/src/test_bins.rs b/src/test_bins.rs index 32d7e6d408..75f13ed382 100644 --- a/src/test_bins.rs +++ b/src/test_bins.rs @@ -181,7 +181,7 @@ pub fn chop() { let stdin = io::stdin(); let mut stdout = io::stdout(); - for given in stdin.lock().lines().flatten() { + for given in stdin.lock().lines().map_while(Result::ok) { let chopped = if given.is_empty() { &given } else {