mirror of
https://github.com/atuinsh/atuin.git
synced 2025-08-16 01:58:13 +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') }}
|
||||
|
||||
- name: Run clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
run: cargo clippy -- -D warnings -D clippy::redundant_clone
|
||||
|
||||
format:
|
||||
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 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 {
|
||||
|
Reference in New Issue
Block a user