]> git.seodisparate.com - swaybar_info/commitdiff
Remove outdated TODO comments
authorStephen Seo <seo.disparate@gmail.com>
Sun, 10 Jul 2022 09:02:00 +0000 (18:02 +0900)
committerStephen Seo <seo.disparate@gmail.com>
Sun, 10 Jul 2022 09:02:00 +0000 (18:02 +0900)
src/swaybar_object.rs

index f07ef6ee16fc4ec8983f89374d2dd1601fed1158..2fc9d48c84e74edfd31cce3221188caf6c3892e2 100644 (file)
@@ -218,7 +218,6 @@ impl SwaybarArray {
         self.objects.is_empty()
     }
 
-    // TODO this is linear, and it probably is possible to improve this
     pub fn get_by_name(&self, name: &str) -> Option<&SwaybarObject> {
         if let Some(idx) = self.objects_idx_map.get(name) {
             return Some(&self.objects[*idx]);
@@ -227,7 +226,6 @@ impl SwaybarArray {
         None
     }
 
-    // TODO this is linear, and it probably is possible to improve this
     pub fn get_by_name_mut(&mut self, name: &str) -> Option<&mut SwaybarObject> {
         if let Some(idx) = self.objects_idx_map.get(name) {
             return Some(&mut self.objects[*idx]);