mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 07:04:29 +00:00
Enable clippy::unnecessary_to_owned lint
Meh
This commit is contained in:
parent
65064ac976
commit
fd7f76c180
5 changed files with 3 additions and 2 deletions
|
@ -95,5 +95,4 @@ clippy.ptr_arg = "allow"
|
|||
clippy.redundant_slicing = "allow"
|
||||
clippy.too_many_arguments = "allow"
|
||||
clippy.uninlined_format_args = "allow"
|
||||
clippy.unnecessary_to_owned = "allow"
|
||||
clippy.unnecessary_unwrap = "allow"
|
||||
|
|
|
@ -309,6 +309,7 @@ pub fn history(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) ->
|
|||
));
|
||||
return STATUS_INVALID_ARGS;
|
||||
}
|
||||
#[allow(clippy::unnecessary_to_owned)]
|
||||
for delete_string in args.iter().copied() {
|
||||
history.remove(delete_string.to_owned());
|
||||
}
|
||||
|
|
|
@ -96,6 +96,7 @@ pub fn source(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> O
|
|||
// points to the end of argv. Otherwise we want to skip the file name to get to the args if any.
|
||||
let mut argv_list: Vec<WString> = vec![];
|
||||
let remaining_args = &args[optind + if argc == optind { 0 } else { 1 }..];
|
||||
#[allow(clippy::unnecessary_to_owned)]
|
||||
for arg in remaining_args.iter().copied() {
|
||||
argv_list.push(arg.to_owned());
|
||||
}
|
||||
|
|
|
@ -1680,6 +1680,7 @@ impl History {
|
|||
cancel_check,
|
||||
);
|
||||
} else {
|
||||
#[allow(clippy::unnecessary_to_owned)]
|
||||
for search_string in search_args.iter().copied() {
|
||||
if search_string.is_empty() {
|
||||
streams
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#![allow(clippy::redundant_slicing)]
|
||||
#![allow(clippy::too_many_arguments)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
#![allow(clippy::unnecessary_to_owned)]
|
||||
#![allow(clippy::unnecessary_unwrap)]
|
||||
|
||||
pub const BUILD_VERSION: &str = match option_env!("FISH_BUILD_VERSION") {
|
||||
|
|
Loading…
Reference in a new issue