mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-23 15:58:12 +08:00
A few minor lints and docs (#1436)
* A few minor lints and docs * Added required packages to compile on Debian-style linux * Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline) * a few spelling mistakes * fix fmt
This commit is contained in:
@@ -214,7 +214,7 @@ pub enum Key {
|
||||
impl fmt::Display for Key {
|
||||
// TODO: Relevant key labels should be localized when we get around to implementing localization/internationalization
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> std::fmt::Result {
|
||||
let key_name = format!("{:?}", self);
|
||||
let key_name = format!("{self:?}");
|
||||
|
||||
// Writing system keys
|
||||
const DIGIT_PREFIX: &str = "Digit";
|
||||
@@ -293,14 +293,14 @@ impl fmt::Display for Key {
|
||||
_ => key_name.as_str(),
|
||||
};
|
||||
|
||||
write!(f, "{}", name)
|
||||
write!(f, "{name}")
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Key> for LayoutKey {
|
||||
fn from(key: Key) -> Self {
|
||||
Self {
|
||||
key: format!("{:?}", key),
|
||||
key: format!("{key:?}"),
|
||||
label: key.to_string(),
|
||||
}
|
||||
}
|
||||
@@ -356,7 +356,7 @@ impl fmt::Display for KeysGroup {
|
||||
joined.truncate(joined.len() - JOINER_MARK.len());
|
||||
}
|
||||
|
||||
write!(f, "{}", joined)
|
||||
write!(f, "{joined}")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ impl ActionKeys {
|
||||
}
|
||||
}
|
||||
Self::Keys(keys) => {
|
||||
warn!("Calling `.to_keys()` on a `ActionKeys::Keys` is a mistake/bug. Keys are: {:?}.", keys);
|
||||
warn!("Calling `.to_keys()` on a `ActionKeys::Keys` is a mistake/bug. Keys are: {keys:?}.");
|
||||
String::new()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user