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:
Yuri Astrakhan
2023-10-18 23:33:10 -07:00
committed by GitHub
parent 67edac4aca
commit 3d4e3a74e5
51 changed files with 140 additions and 158 deletions
@@ -60,16 +60,16 @@ impl OverlayRenderer {
self.layer_overlay_visibility(document, layer, true, responses);
let outline_cache = self.shape_overlay_cache.get(&layer);
trace!("Overlay: Outline cache {:?}", &outline_cache);
trace!("Overlay: Outline cache {outline_cache:?}");
// Create an outline if we do not have a cached one
if outline_cache.is_none() {
let outline_path = self.create_shape_outline_overlay(graphene_core::vector::Subpath::from_bezier_rs(subpaths), responses);
self.shape_overlay_cache.insert(layer, outline_path.clone());
Self::place_outline_overlays(outline_path.clone(), &transform, responses);
trace!("Overlay: Creating new outline {:?}", &outline_path);
trace!("Overlay: Creating new outline {outline_path:?}");
} else if let Some(outline_path) = outline_cache {
trace!("Overlay: Updating overlays for {:?} owning layer: {:?}", outline_path, layer);
trace!("Overlay: Updating overlays for {outline_path:?} owning layer: {layer:?}");
Self::modify_outline_overlays(outline_path.clone(), graphene_core::vector::Subpath::from_bezier_rs(subpaths), responses);
Self::place_outline_overlays(outline_path.clone(), &transform, responses);
}
@@ -294,7 +294,7 @@ impl OverlayRenderer {
/// Removes the manipulator overlays from the overlay document.
fn remove_manipulator_group_overlays(overlay_paths: &ManipulatorGroupOverlays, responses: &mut VecDeque<Message>) {
overlay_paths.iter().flatten().for_each(|layer_id| {
trace!("Overlay: Sending delete message for: {:?}", layer_id);
trace!("Overlay: Sending delete message for: {layer_id:?}");
responses.add(DocumentMessage::Overlays(Operation::DeleteLayer { path: layer_id.clone() }.into()));
});
}
@@ -71,7 +71,7 @@ impl ShapeState {
}
if let Some((layer, manipulator_point_id)) = self.find_nearest_point_indices(document, mouse_position, select_threshold) {
trace!("Selecting... manipulator point: {:?}", manipulator_point_id);
trace!("Selecting... manipulator point: {manipulator_point_id:?}");
let subpaths = get_subpaths(layer, document)?;
let manipulator_group = get_manipulator_groups(subpaths).find(|group| group.id == manipulator_point_id.group)?;
@@ -631,7 +631,7 @@ impl ShapeState {
if let Some((manipulator_point_id, distance_squared)) = Self::closest_point_in_layer(document, layer, mouse_position) {
// Choose the first point under the threshold
if distance_squared < select_threshold_squared {
trace!("Selecting... manipulator point: {:?}", manipulator_point_id);
trace!("Selecting... manipulator point: {manipulator_point_id:?}");
return Some((layer, manipulator_point_id));
}
}