mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 11:29:25 +00:00
Better method ordering
This commit is contained in:
parent
43d94e37ec
commit
baa16a2fc6
1 changed files with 7 additions and 7 deletions
|
@ -96,13 +96,6 @@ impl StatusBar {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
pub fn position_of_item<T>(&self) -> Option<usize>
|
||||
where
|
||||
T: StatusItemView,
|
||||
{
|
||||
self.position_of_named_item(T::ui_name())
|
||||
}
|
||||
|
||||
pub fn item_of_type<T: StatusItemView>(&self) -> Option<ViewHandle<T>> {
|
||||
self.left_items
|
||||
.iter()
|
||||
|
@ -110,6 +103,13 @@ impl StatusBar {
|
|||
.find_map(|item| item.as_any().clone().downcast())
|
||||
}
|
||||
|
||||
pub fn position_of_item<T>(&self) -> Option<usize>
|
||||
where
|
||||
T: StatusItemView,
|
||||
{
|
||||
self.position_of_named_item(T::ui_name())
|
||||
}
|
||||
|
||||
pub fn position_of_named_item(&self, name: &str) -> Option<usize> {
|
||||
for (index, item) in self.left_items.iter().enumerate() {
|
||||
if item.as_ref().ui_name() == name {
|
||||
|
|
Loading…
Reference in a new issue