mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-14 07:22:45 +08:00
Address clippy lints
This commit is contained in:
parent
de6c4f85bc
commit
c7adb572d0
|
@ -163,7 +163,7 @@ impl<'s> FileTester<'s> {
|
||||||
// Note we color "try_input" files as errors if they are invalid,
|
// Note we color "try_input" files as errors if they are invalid,
|
||||||
// even though it's possible to execute these (replaced via /dev/null).
|
// even though it's possible to execute these (replaced via /dev/null).
|
||||||
waccess(&target_path, libc::R_OK) == 0
|
waccess(&target_path, libc::R_OK) == 0
|
||||||
&& wstat(&target_path).map_or(false, |md| !md.file_type().is_dir())
|
&& wstat(&target_path).is_ok_and(|md| !md.file_type().is_dir())
|
||||||
}
|
}
|
||||||
RedirectionMode::overwrite | RedirectionMode::append | RedirectionMode::noclob => {
|
RedirectionMode::overwrite | RedirectionMode::append | RedirectionMode::noclob => {
|
||||||
if string_suffixes_string(L!("/"), &target) {
|
if string_suffixes_string(L!("/"), &target) {
|
||||||
|
|
|
@ -891,7 +891,7 @@ impl<'s> Highlighter<'s> {
|
||||||
let source_range = arg.source_range();
|
let source_range = arg.source_range();
|
||||||
let is_prefix = self
|
let is_prefix = self
|
||||||
.cursor
|
.cursor
|
||||||
.map_or(false, |c| source_range.contains_inclusive(c));
|
.is_some_and(|c| source_range.contains_inclusive(c));
|
||||||
let token = arg.source(self.buff).to_owned();
|
let token = arg.source(self.buff).to_owned();
|
||||||
let test_result = if cmd_is_cd {
|
let test_result = if cmd_is_cd {
|
||||||
self.file_tester.test_cd_path(&token, is_prefix)
|
self.file_tester.test_cd_path(&token, is_prefix)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user