mirror of
https://github.com/atuinsh/atuin.git
synced 2025-08-17 18:41:37 +02:00
fix: add redundant clones to clippy and cleanup instances of it (#2654)
This commit is contained in:
2
.github/workflows/rust.yml
vendored
2
.github/workflows/rust.yml
vendored
@ -212,7 +212,7 @@ jobs:
|
|||||||
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: Run clippy
|
- name: Run clippy
|
||||||
run: cargo clippy -- -D warnings
|
run: cargo clippy -- -D warnings -D clippy::redundant_clone
|
||||||
|
|
||||||
format:
|
format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -98,12 +98,12 @@ pub fn parse_alias(line: &str) -> Option<Alias> {
|
|||||||
|
|
||||||
let mut parts = parts.iter().map(|s| s.to_string());
|
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 {
|
let remaining = if is_fish {
|
||||||
parts.collect::<Vec<String>>().join(" ").to_string()
|
parts.collect::<Vec<String>>().join(" ")
|
||||||
} else {
|
} else {
|
||||||
parts.collect::<Vec<String>>().join("=").to_string()
|
parts.collect::<Vec<String>>().join("=")
|
||||||
};
|
};
|
||||||
|
|
||||||
Some(Alias {
|
Some(Alias {
|
||||||
|
Reference in New Issue
Block a user