From 5b3ad7c257b69c9d470c0380498116213bdcc11c Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Thu, 30 Nov 2023 21:58:26 +0100 Subject: [PATCH] code: Fix typos --- src/decoder/mod.rs | 4 ++-- src/decoder/tiling.rs | 4 ++-- src/widgets/image_view.rs | 2 +- src/widgets/print.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/decoder/mod.rs b/src/decoder/mod.rs index d17aeaf..ff8e8be 100644 --- a/src/decoder/mod.rs +++ b/src/decoder/mod.rs @@ -67,7 +67,7 @@ pub enum DecoderUpdate { Redraw, /// Start animation Animated, - /// And error occured during decoding + /// And error occurred during decoding Error(anyhow::Error), } @@ -80,7 +80,7 @@ impl UpdateSender { } } - /// Send occuring errors to renderer + /// Send occurring errors to renderer pub fn spawn_error_handled(&self, f: F) -> glib::JoinHandle<()> where F: std::future::Future> + Send + 'static, diff --git a/src/decoder/tiling.rs b/src/decoder/tiling.rs index e5d861c..7508b37 100644 --- a/src/decoder/tiling.rs +++ b/src/decoder/tiling.rs @@ -108,7 +108,7 @@ impl Tile { return; } - // TODO: do not clip outer bounderies of the image + // TODO: do not clip outer boundaries of the image snapshot.push_clip(&area); // TODO: do not clip outer boundaries of the image if let Some(background_color) = &options.background_color { @@ -465,7 +465,7 @@ impl Tiling { /// Returns relevant tiles /// - /// This gives what tiles are needed for convering the `preload_area`. + /// This gives what tiles are needed for covering the `preload_area`. /// Decoders use the [`TileInstructions`] to know what they have to render. pub fn relevant_tiles(&self, preload_area: &graphene::Rect) -> Vec { let original_width = self.scaled_dimensions().0 as f32; diff --git a/src/widgets/image_view.rs b/src/widgets/image_view.rs index bed208f..4a84f83 100644 --- a/src/widgets/image_view.rs +++ b/src/widgets/image_view.rs @@ -128,7 +128,7 @@ mod imp { self.parent_constructed(); - // Manually mange widget layout, see `WidgetImpl` for details + // Manually manage widget layout, see `WidgetImpl` for details obj.set_layout_manager(None::); self.sliding_view.connect_current_page_notify( diff --git a/src/widgets/print.rs b/src/widgets/print.rs index c3c5127..b0f862c 100644 --- a/src/widgets/print.rs +++ b/src/widgets/print.rs @@ -93,7 +93,7 @@ impl From<&str> for PageAlignment { "left" => (HAlignment::Left, VAlignment::Middle), "right" => (HAlignment::Right, VAlignment::Middle), pos => { - log::error!("Unkown alignment '{pos}'"); + log::error!("Unknown alignment '{pos}'"); (HAlignment::default(), VAlignment::default()) } };