1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-25 17:21:43 +00:00

chore: address all cargo clippy lints

* also do a bit of a doc cleanup for the `load_from_folder` fn
This commit is contained in:
Yuri Astrakhan
2025-08-18 20:06:01 -04:00
committed by Martin Nordholts
parent d9fbd18541
commit 503c50b1ec
6 changed files with 25 additions and 22 deletions
+2 -2
View File
@@ -96,7 +96,7 @@ impl App {
Ok(clap_app::build_app(interactive_output).get_matches_from(args))
}
pub fn config(&self, inputs: &[Input]) -> Result<Config> {
pub fn config(&self, inputs: &[Input]) -> Result<Config<'_>> {
let style_components = self.style_components()?;
let extra_plain = self.matches.get_count("plain") > 1;
@@ -338,7 +338,7 @@ impl App {
})
}
pub fn inputs(&self) -> Result<Vec<Input>> {
pub fn inputs(&self) -> Result<Vec<Input<'_>>> {
let filenames: Option<Vec<&Path>> = self
.matches
.get_many::<PathBuf>("file-name")
+1 -1
View File
@@ -5,7 +5,7 @@ pub fn new_file_input<'a>(file: &'a Path, name: Option<&'a Path>) -> Input<'a> {
named(Input::ordinary_file(file), name.or(Some(file)))
}
pub fn new_stdin_input(name: Option<&Path>) -> Input {
pub fn new_stdin_input(name: Option<&Path>) -> Input<'_> {
named(Input::stdin(), name)
}