Skip to content

Commit 0b9d69a

Browse files
committed
Fix clippy errors
1 parent ed09269 commit 0b9d69a

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/handlers/grep.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ fn get_code_style_sections<'b>(
404404
if let Some(prefix_end) = ansi::ansi_preserving_index(
405405
raw_line,
406406
match line_number {
407-
Some(n) => format!("{}:{}:", path, n).len() - 1,
407+
Some(n) => format!("{path}:{n}:").len() - 1,
408408
None => path.len(),
409409
},
410410
) {

src/subcommands/external.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ impl std::fmt::Debug for SubCmdKind {
3737
SubCmdKind::Git(Some(arg)) => {
3838
return formatter.write_fmt(format_args!("\"git {}\"", arg.escape_debug()))
3939
}
40-
_ => format!("{}", self),
40+
_ => format!("{self}"),
4141
};
4242
formatter.write_str("\"")?;
4343
formatter.write_str(&s)?;

src/utils/bat/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl OutputType {
7373
)
7474
.unwrap();
7575
let mut writer = output_type.handle().unwrap();
76-
write!(&mut writer, "{}", data)
76+
write!(&mut writer, "{data}")
7777
}
7878

7979
pub fn from_mode(

src/utils/tabs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ impl TabCfg {
2121

2222
/// Expand tabs as spaces.
2323
pub fn expand(line: &str, tab_cfg: &TabCfg) -> String {
24-
if tab_cfg.replace() && line.as_bytes().iter().any(|c| *c == b'\t') {
24+
if tab_cfg.replace() && line.as_bytes().contains(&b'\t') {
2525
itertools::join(line.split('\t'), &tab_cfg.replacement)
2626
} else {
2727
line.to_string()

0 commit comments

Comments
 (0)