Fix some more clippies and enable more warnings

This commit is contained in:
ridiculousfish 2024-05-12 15:12:37 -07:00
parent fc5eb0a98a
commit caef202551
2 changed files with 2 additions and 21 deletions

View File

@ -76,24 +76,5 @@ rust.non_camel_case_types = "allow"
rust.non_upper_case_globals = "allow"
rust.unknown_lints = "allow"
rust.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.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.manual_range_contains = "allow"
clippy.mut_from_ref = "allow"
clippy.needless_return = "allow"
clippy.new_without_default = "allow"
clippy.option_map_unit_fn = "allow"
clippy.ptr_arg = "allow"
clippy.redundant_slicing = "allow"
clippy.too_many_arguments = "allow"
clippy.uninlined_format_args = "allow"

View File

@ -741,13 +741,13 @@ fn escape_single_quoted_hack_hack_hack_hack(s: &wstr) -> OsString {
result
}
fn fish_xdm_login_hack_hack_hack_hack(cmds: &mut Vec<OsString>, args: &[WString]) -> bool {
fn fish_xdm_login_hack_hack_hack_hack(cmds: &mut [OsString], args: &[WString]) -> bool {
if cmds.len() != 1 {
return false;
}
let mut result = false;
let cmd = cmds.get(0).unwrap();
let cmd = &cmds[0];
if cmd == "exec \"${@}\"" || cmd == "exec \"$@\"" {
// We're going to construct a new command that starts with exec, and then has the
// remaining arguments escaped.