fix: Fix clippy warnings
All checks were successful
ci/woodpecker/push/build Pipeline was successful
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:
parent
df54cc7484
commit
6f27e7f3fc
1 changed files with 2 additions and 2 deletions
|
|
@ -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());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue