fix: Fix clippy warnings
All checks were successful
ci/woodpecker/push/build Pipeline was successful

- Use is_empty iso len() == 0
- Remove unneeded return type
This commit is contained in:
Laurens Miers 2025-05-27 18:12:23 +02:00
parent df54cc7484
commit 6f27e7f3fc

View file

@ -10,7 +10,7 @@ struct Args {
script: Option<String>, script: Option<String>,
} }
fn run(lines: io::Lines<io::BufReader<File>>) -> () { fn run(lines: io::Lines<io::BufReader<File>>) {
for line in lines { for line in lines {
println!("Line: {}", line.unwrap()); println!("Line: {}", line.unwrap());
} }
@ -30,7 +30,7 @@ fn run_prompt() -> Result<(), io::Error> {
let mut buffer = String::new(); let mut buffer = String::new();
io::stdin().read_line(&mut buffer)?; io::stdin().read_line(&mut buffer)?;
if buffer.len() == 0 { if buffer.is_empty() {
break; break;
} }
println!("input: '{}', {}", buffer, buffer.len()); println!("input: '{}', {}", buffer, buffer.len());