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();
|
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>> {
|
pub fn item_of_type<T: StatusItemView>(&self) -> Option<ViewHandle<T>> {
|
||||||
self.left_items
|
self.left_items
|
||||||
.iter()
|
.iter()
|
||||||
|
@ -110,6 +103,13 @@ impl StatusBar {
|
||||||
.find_map(|item| item.as_any().clone().downcast())
|
.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> {
|
pub fn position_of_named_item(&self, name: &str) -> Option<usize> {
|
||||||
for (index, item) in self.left_items.iter().enumerate() {
|
for (index, item) in self.left_items.iter().enumerate() {
|
||||||
if item.as_ref().ui_name() == name {
|
if item.as_ref().ui_name() == name {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue