From df52afa106296947465edb40fa23c7a29069c9aa Mon Sep 17 00:00:00 2001 From: Keith Simmons Date: Fri, 7 Jan 2022 13:31:27 -0800 Subject: [PATCH] formatting and clippy fixes --- src/bridge/handler.rs | 9 +++------ src/renderer/fonts/caching_shaper.rs | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/bridge/handler.rs b/src/bridge/handler.rs index 4a4d8c0..da3eb13 100644 --- a/src/bridge/handler.rs +++ b/src/bridge/handler.rs @@ -41,8 +41,7 @@ impl Handler for NeovimHandler { .unwrap_or_explained_panic("Could not parse event from neovim"); for parsed_event in parsed_events { - EVENT_AGGREGATOR - .send(EditorCommand::NeovimRedrawEvent(parsed_event)); + EVENT_AGGREGATOR.send(EditorCommand::NeovimRedrawEvent(parsed_event)); } } } @@ -51,13 +50,11 @@ impl Handler for NeovimHandler { } #[cfg(windows)] "neovide.register_right_click" => { - EVENT_AGGREGATOR - .send(UiCommand::Parallel(ParallelCommand::RegisterRightClick)); + EVENT_AGGREGATOR.send(UiCommand::Parallel(ParallelCommand::RegisterRightClick)); } #[cfg(windows)] "neovide.unregister_right_click" => { - EVENT_AGGREGATOR - .send(UiCommand::Parallel(ParallelCommand::UnregisterRightClick)); + EVENT_AGGREGATOR.send(UiCommand::Parallel(ParallelCommand::UnregisterRightClick)); } _ => {} } diff --git a/src/renderer/fonts/caching_shaper.rs b/src/renderer/fonts/caching_shaper.rs index 121b9c1..66ea9e5 100644 --- a/src/renderer/fonts/caching_shaper.rs +++ b/src/renderer/fonts/caching_shaper.rs @@ -169,7 +169,7 @@ impl CachingShaper { Script::Latin, text.graphemes(true) .enumerate() - .map(|(glyph_index, unicode_segment)| { + .flat_map(|(glyph_index, unicode_segment)| { unicode_segment.chars().map(move |character| { let token = Token { ch: character, @@ -182,7 +182,6 @@ impl CachingShaper { token }) }) - .flatten(), ); let mut results = Vec::new();