mirror of
https://github.com/nushell/nushell.git
synced 2025-03-26 15:26:51 +01:00
Apply nightly clippy fixes (#11508)
# Description Clippy fixes # User-Facing Changes N/A
This commit is contained in:
parent
42b03917fb
commit
a109283118
@ -1,3 +1 @@
|
||||
pub(crate) mod case;
|
||||
|
||||
pub use case::*;
|
||||
|
@ -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(
|
||||
|
@ -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"
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user