mirror of
https://github.com/TECHNOFAB11/tmux-copyrat.git
synced 2025-12-14 08:53:52 +01:00
refactor: follow clippy suggestions
This commit is contained in:
parent
7e28931f6c
commit
ffd8e9b12d
7 changed files with 38 additions and 69 deletions
|
|
@ -6,7 +6,7 @@ use crate::error;
|
|||
///
|
||||
/// Keep in mind letters 'n' and 'y' are systematically removed at runtime to
|
||||
/// prevent conflict with navigation and yank/copy keys.
|
||||
const ALPHABETS: [(&'static str, &'static str); 21] = [
|
||||
const ALPHABETS: [(&str, &str); 21] = [
|
||||
// ("abcd", "abcd"),
|
||||
("qwerty", "asdfqwerzxcvjklmiuopghtybn"),
|
||||
("qwerty-homerow", "asdfjklgh"),
|
||||
|
|
@ -47,7 +47,7 @@ pub fn parse_alphabet(src: &str) -> Result<Alphabet, error::ParseError> {
|
|||
match alphabet_pair {
|
||||
Some((_name, letters)) => {
|
||||
let letters = letters.replace(&['n', 'N', 'y', 'Y'][..], "");
|
||||
Ok(Alphabet(letters.to_string()))
|
||||
Ok(Alphabet(letters))
|
||||
}
|
||||
None => Err(error::ParseError::UnknownAlphabet),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue