diff options
author | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-12-16 22:13:51 -0800 |
commit | dc918ae71a5e6c78a77994d7ce106a2253918c54 (patch) | |
tree | 537c7d13443e18ed657398f4eca0bf921ef4ac5e /src/config.rs | |
parent | 3b995ff87a54239ecacb95d51f65c17504a8d22c (diff) | |
download | alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.tar.gz alacritty-dc918ae71a5e6c78a77994d7ce106a2253918c54.zip |
Rustup and clippy
All of the changes in this commit are due to clippy lints.
Diffstat (limited to 'src/config.rs')
-rw-r--r-- | src/config.rs | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/src/config.rs b/src/config.rs index 23010350..a6d8150e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -242,10 +242,10 @@ impl de::Deserialize for ModsWrapper { let mut res = Mods::empty(); for modifier in value.split('|') { match modifier { - "Command" | "Super" => res = res | mods::SUPER, - "Shift" => res = res | mods::SHIFT, - "Alt" | "Option" => res = res | mods::ALT, - "Control" => res = res | mods::CONTROL, + "Command" | "Super" => res |= mods::SUPER, + "Shift" => res |= mods::SHIFT, + "Alt" | "Option" => res |= mods::ALT, + "Control" => res |= mods::CONTROL, _ => err_println!("unknown modifier {:?}", modifier), } } @@ -315,10 +315,10 @@ impl de::Deserialize for ModeWrapper { for modifier in value.split('|') { match modifier { - "AppCursor" => res.mode = res.mode | mode::APP_CURSOR, - "~AppCursor" => res.not_mode = res.not_mode | mode::APP_CURSOR, - "AppKeypad" => res.mode = res.mode | mode::APP_KEYPAD, - "~AppKeypad" => res.not_mode = res.not_mode | mode::APP_KEYPAD, + "AppCursor" => res.mode |= mode::APP_CURSOR, + "~AppCursor" => res.not_mode |= mode::APP_CURSOR, + "AppKeypad" => res.mode |= mode::APP_KEYPAD, + "~AppKeypad" => res.not_mode |= mode::APP_KEYPAD, _ => err_println!("unknown omde {:?}", modifier), } } @@ -369,8 +369,8 @@ impl de::Deserialize for MouseButton { } } -/// Bindings are deserialized into a RawBinding before being parsed as a -/// KeyBinding or MouseBinding. +/// Bindings are deserialized into a `RawBinding` before being parsed as a +/// `KeyBinding` or `MouseBinding`. struct RawBinding { key: Option<::glutin::VirtualKeyCode>, mouse: Option<::glutin::MouseButton>, @@ -879,7 +879,7 @@ impl Config { /// Pixels per inch /// -/// This is only used on FreeType systems +/// This is only used on `FreeType` systems #[derive(Debug, Deserialize)] pub struct Dpi { /// Horizontal dpi @@ -1176,6 +1176,7 @@ mod tests { } } +#[cfg_attr(feature = "clippy", allow(enum_variant_names))] #[derive(Deserialize, Copy, Clone)] enum Key { Key1, |