mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Tweak the allowed clippy set and fix some
This commit is contained in:
parent
90535d5b51
commit
1cbd18cc30
5 changed files with 9 additions and 12 deletions
|
@ -96,7 +96,7 @@ fn builtin_jobs_print(j: &Job, mode: JobsPrintMode, header: bool, streams: &mut
|
|||
JobsPrintMode::PrintGroup => {
|
||||
if header {
|
||||
// Print table header before first job.
|
||||
out += &wgettext!("Group\n")[..];
|
||||
out += wgettext!("Group\n");
|
||||
}
|
||||
out += &sprintf!("%d\n", pgid)[..];
|
||||
streams.out.append(out);
|
||||
|
@ -104,7 +104,7 @@ fn builtin_jobs_print(j: &Job, mode: JobsPrintMode, header: bool, streams: &mut
|
|||
JobsPrintMode::PrintPid => {
|
||||
if header {
|
||||
// Print table header before first job.
|
||||
out += &wgettext!("Process\n")[..];
|
||||
out += wgettext!("Process\n");
|
||||
}
|
||||
|
||||
for p in j.processes() {
|
||||
|
@ -115,7 +115,7 @@ fn builtin_jobs_print(j: &Job, mode: JobsPrintMode, header: bool, streams: &mut
|
|||
JobsPrintMode::PrintCommand => {
|
||||
if header {
|
||||
// Print table header before first job.
|
||||
out += &wgettext!("Command\n")[..];
|
||||
out += wgettext!("Command\n");
|
||||
}
|
||||
|
||||
for p in j.processes() {
|
||||
|
|
|
@ -539,7 +539,7 @@ pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Opt
|
|||
Err(retval) => return retval,
|
||||
};
|
||||
let cmd = argv[0];
|
||||
let mut argv = &argv[..];
|
||||
let mut argv: &[&wstr] = argv;
|
||||
if !opts.to_stdout {
|
||||
argv = &argv[optind..];
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ impl<'args> StringSubCommand<'args> for Shorten<'args> {
|
|||
// truncating instead.
|
||||
(L!(""), 0)
|
||||
} else {
|
||||
(&self.ellipsis[..], self.ellipsis_width)
|
||||
(self.ellipsis, self.ellipsis_width)
|
||||
};
|
||||
|
||||
let mut nsub = 0usize;
|
||||
|
|
|
@ -5,21 +5,18 @@
|
|||
#![allow(unstable_name_collisions)]
|
||||
#![allow(clippy::assigning_clones)]
|
||||
#![allow(clippy::bool_assert_comparison)]
|
||||
#![allow(clippy::box_default)]
|
||||
#![allow(clippy::collapsible_if)]
|
||||
#![allow(clippy::comparison_chain)]
|
||||
#![allow(clippy::derivable_impls)]
|
||||
#![allow(clippy::doc_lazy_continuation)]
|
||||
#![allow(clippy::field_reassign_with_default)]
|
||||
#![allow(clippy::get_first)]
|
||||
#![allow(clippy::if_same_then_else)]
|
||||
#![allow(clippy::incompatible_msrv)]
|
||||
#![allow(clippy::len_without_is_empty)]
|
||||
#![allow(clippy::manual_is_ascii_check)]
|
||||
#![allow(clippy::mut_from_ref)]
|
||||
#![allow(clippy::needless_return)]
|
||||
#![allow(clippy::new_without_default)]
|
||||
#![allow(clippy::option_map_unit_fn)]
|
||||
#![allow(clippy::redundant_slicing)]
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
|
|
|
@ -463,7 +463,7 @@ fn test_history_path_detection() {
|
|||
|
||||
// Place one valid file in the directory.
|
||||
let filename = L!("testfile");
|
||||
std::fs::write(wcs2osstring(&(tmpdir.clone() + &filename[..])), []).unwrap();
|
||||
std::fs::write(wcs2osstring(&(tmpdir.clone() + filename)), []).unwrap();
|
||||
|
||||
let test_vars = EnvStack::new();
|
||||
test_vars.set_one(L!("PWD"), EnvMode::GLOBAL, tmpdir.clone());
|
||||
|
@ -560,8 +560,8 @@ fn install_sample_history(name: &wstr) {
|
|||
std::fs::copy(
|
||||
env!("CARGO_MANIFEST_DIR").to_owned()
|
||||
+ "/tests/"
|
||||
+ std::str::from_utf8(&wcs2string(&name[..])).unwrap(),
|
||||
wcs2osstring(&(path + L!("/") + &name[..] + L!("_history"))),
|
||||
+ std::str::from_utf8(&wcs2string(name)).unwrap(),
|
||||
wcs2osstring(&(path + L!("/") + name + L!("_history"))),
|
||||
)
|
||||
.unwrap();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue