Apply nightly clippy fixes (#11508)

# Description

Clippy fixes

# User-Facing Changes
N/A
This commit is contained in:
nibon7 2024-01-15 10:52:16 +08:00 committed by GitHub
parent 42b03917fb
commit a109283118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 9 deletions

View File

@ -1,3 +1 @@
pub(crate) mod case;
pub use case::*;

View File

@ -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(

View File

@ -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"

View File

@ -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 {