mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-06-02 14:01:13 -03:00
clippy
This commit is contained in:
6
build.rs
6
build.rs
@@ -1,5 +1,5 @@
|
||||
use std::fs::{copy, create_dir_all, OpenOptions};
|
||||
use std::io::{Read, Seek, SeekFrom, Write};
|
||||
use std::io::{Read, Seek, Write};
|
||||
|
||||
use clap_complete::{generate_to, shells};
|
||||
|
||||
@@ -30,7 +30,7 @@ fn main() {
|
||||
let mut bash_file = OpenOptions::new()
|
||||
.read(true)
|
||||
.write(true)
|
||||
.open(format!("{}/feroxbuster.bash", outdir))
|
||||
.open(format!("{outdir}/feroxbuster.bash"))
|
||||
.expect("Couldn't open bash completion script");
|
||||
|
||||
bash_file
|
||||
@@ -40,7 +40,7 @@ fn main() {
|
||||
contents = contents.replace("default feroxbuster", "default -o plusdirs feroxbuster");
|
||||
|
||||
bash_file
|
||||
.seek(SeekFrom::Start(0))
|
||||
.rewind()
|
||||
.expect("Couldn't seek to position 0 in bash completion script");
|
||||
|
||||
bash_file
|
||||
|
||||
@@ -637,8 +637,7 @@ fn valid_time_spec(time_spec: &str) -> Result<String, String> {
|
||||
true => Ok(time_spec.to_string()),
|
||||
false => {
|
||||
let msg = format!(
|
||||
"Expected a non-negative, whole number followed by s, m, h, or d (case insensitive); received {}",
|
||||
time_spec
|
||||
"Expected a non-negative, whole number followed by s, m, h, or d (case insensitive); received {time_spec}"
|
||||
);
|
||||
Err(msg)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user