diff --git a/fish-rust/src/function.rs b/fish-rust/src/function.rs index fa37baf27..a265ae19f 100644 --- a/fish-rust/src/function.rs +++ b/fish-rust/src/function.rs @@ -311,7 +311,7 @@ pub fn copy(name: &wstr, new_name: WString, parser: &Parser) -> bool { let mut new_props = props.as_ref().clone(); new_props.is_autoload.store(false); new_props.is_copy = true; - new_props.copy_definition_file = filename.clone(); + new_props.copy_definition_file = filename; new_props.copy_definition_lineno = lineno.unwrap_or(0) as i32; // Note this will NOT overwrite an existing function with the new name. diff --git a/fish-rust/src/parse_execution.rs b/fish-rust/src/parse_execution.rs index df94d43cf..c2a5372a8 100644 --- a/fish-rust/src/parse_execution.rs +++ b/fish-rust/src/parse_execution.rs @@ -878,7 +878,7 @@ impl<'a> ParseExecutionContext { let reason = self.determine_redirections(ctx, args_or_redirs, &mut redirections); if reason == EndExecutionReason::ok { proc.typ = ProcessType::block_node; - proc.block_node_source = Some(self.pstree().clone()); + proc.block_node_source = Some(self.pstree()); proc.internal_block_node = Some(statement.into()); proc.set_redirection_specs(redirections); } @@ -1633,7 +1633,7 @@ impl<'a> ParseExecutionContext { if props.wants_timing && props.initial_background { return report_error!( self, - &ctx, + ctx, STATUS_INVALID_ARGS.unwrap(), job_node, ERROR_TIME_BACKGROUND diff --git a/fish-rust/src/wildcard.rs b/fish-rust/src/wildcard.rs index 12a01746e..4c42f5b5b 100644 --- a/fish-rust/src/wildcard.rs +++ b/fish-rust/src/wildcard.rs @@ -60,11 +60,11 @@ pub enum WildcardResult { } // This does something horrible refactored from an even more horrible function. -fn resolve_description<'f>( +fn resolve_description( full_completion: &wstr, completion: &mut &wstr, expand_flags: ExpandFlags, - description_func: Option<&'f dyn Fn(&wstr) -> WString>, + description_func: Option<&dyn Fn(&wstr) -> WString>, ) -> WString { if let Some(complete_sep_loc) = completion.find_char(PROG_COMPLETE_SEP) { // This completion has an embedded description, do not use the generic description. @@ -283,10 +283,10 @@ fn wildcard_complete_internal( } } -pub fn wildcard_complete<'f>( +pub fn wildcard_complete( s: &wstr, wc: &wstr, - desc_func: Option<&'f dyn Fn(&wstr) -> WString>, + desc_func: Option<&dyn Fn(&wstr) -> WString>, out: Option<&mut CompletionReceiver>, expand_flags: ExpandFlags, flags: CompleteFlags,