zed: Reduce clones (#30550)
A collection of small patches that reduce clones. Mostly by using owned iterators where possible. Release Notes: - N/A
This commit is contained in:
parent
f0f0a52793
commit
8000151aa9
8 changed files with 22 additions and 23 deletions
|
@ -278,8 +278,8 @@ impl CompletionProvider for SlashCommandCompletionProvider {
|
|||
buffer.anchor_after(Point::new(position.row, first_arg_start.start as u32));
|
||||
let arguments = call
|
||||
.arguments
|
||||
.iter()
|
||||
.filter_map(|argument| Some(line.get(argument.clone())?.to_string()))
|
||||
.into_iter()
|
||||
.filter_map(|argument| Some(line.get(argument)?.to_string()))
|
||||
.collect::<Vec<_>>();
|
||||
let argument_range = first_arg_start..buffer_position;
|
||||
(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue