fix: add redundant clones to clippy and cleanup instances of it (#2654)

This commit is contained in:
Frank Hamand
2025-04-01 15:47:25 +01:00
committed by GitHub
parent 6072241422
commit 06edab617a
2 changed files with 4 additions and 4 deletions

View File

@ -212,7 +212,7 @@ jobs:
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
- name: Run clippy
run: cargo clippy -- -D warnings
run: cargo clippy -- -D warnings -D clippy::redundant_clone
format:
runs-on: ubuntu-latest

View File

@ -98,12 +98,12 @@ pub fn parse_alias(line: &str) -> Option<Alias> {
let mut parts = parts.iter().map(|s| s.to_string());
let name = parts.next().unwrap().to_string();
let name = parts.next().unwrap();
let remaining = if is_fish {
parts.collect::<Vec<String>>().join(" ").to_string()
parts.collect::<Vec<String>>().join(" ")
} else {
parts.collect::<Vec<String>>().join("=").to_string()
parts.collect::<Vec<String>>().join("=")
};
Some(Alias {