From baa16a2fc6d23b208f4824ad8b6130ff5385f1d1 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Mon, 24 Jul 2023 09:57:51 -0600 Subject: [PATCH] Better method ordering --- crates/workspace/src/status_bar.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/workspace/src/status_bar.rs b/crates/workspace/src/status_bar.rs index 7b1c11dcf25e88a11c11d028b1b8864521b5f251..8c3cfe20532946c088fe9947869d426319cbdd62 100644 --- a/crates/workspace/src/status_bar.rs +++ b/crates/workspace/src/status_bar.rs @@ -96,13 +96,6 @@ impl StatusBar { cx.notify(); } - pub fn position_of_item(&self) -> Option - where - T: StatusItemView, - { - self.position_of_named_item(T::ui_name()) - } - pub fn item_of_type(&self) -> Option> { self.left_items .iter() @@ -110,6 +103,13 @@ impl StatusBar { .find_map(|item| item.as_any().clone().downcast()) } + pub fn position_of_item(&self) -> Option + where + T: StatusItemView, + { + self.position_of_named_item(T::ui_name()) + } + pub fn position_of_named_item(&self, name: &str) -> Option { for (index, item) in self.left_items.iter().enumerate() { if item.as_ref().ui_name() == name {