mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-30 18: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:
@@ -71,20 +71,14 @@ impl<F: Fn(&MessageDiscriminant) -> Vec<KeysGroup>> MessageHandler<LayoutMessage
|
||||
let layout = if let Some(layout) = self.layouts.get_mut(layout_target as usize) {
|
||||
layout
|
||||
} else {
|
||||
warn!(
|
||||
"UpdateLayout was called referencing an invalid layout. `widget_id: {}`, `layout_target: {:?}`",
|
||||
widget_id, layout_target
|
||||
);
|
||||
warn!("UpdateLayout was called referencing an invalid layout. `widget_id: {widget_id}`, `layout_target: {layout_target:?}`",);
|
||||
return;
|
||||
};
|
||||
|
||||
let widget_holder = if let Some(widget_holder) = layout.iter_mut().find(|widget| widget.widget_id == widget_id) {
|
||||
widget_holder
|
||||
} else {
|
||||
warn!(
|
||||
"UpdateLayout was called referencing an invalid widget ID, although the layout target was valid. `widget_id: {}`, `layout_target: {:?}`",
|
||||
widget_id, layout_target
|
||||
);
|
||||
warn!("UpdateLayout was called referencing an invalid widget ID, although the layout target was valid. `widget_id: {widget_id}`, `layout_target: {layout_target:?}`",);
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ impl From<&str> for PivotPosition {
|
||||
"BottomLeft" => PivotPosition::BottomLeft,
|
||||
"BottomCenter" => PivotPosition::BottomCenter,
|
||||
"BottomRight" => PivotPosition::BottomRight,
|
||||
_ => panic!("Failed parsing unrecognized PivotPosition enum value '{}'", input),
|
||||
_ => panic!("Failed parsing unrecognized PivotPosition enum value '{input}'"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user