We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent edb0cd7 commit 0efbfccCopy full SHA for 0efbfcc
src/components/select_path_modal.rs
@@ -52,15 +52,13 @@ impl SelectPathModal {
52
53
/// Returns the currently selected path. If none are selected then the Option value will be None.
54
pub fn get_selected_path(&self) -> Option<PathEnum> {
55
- let mut path: Option<PathEnum> = None;
56
for current_path in &self.toggleable_paths {
57
if current_path.state {
58
- path = Some(current_path.unwrap());
59
- break;
+ return Some(current_path.unwrap());
60
}
61
62
63
- path
+ return None;
64
65
66
/// This function will modify current_paths so that it only has one selected - preferring the newer of the two items if there are two items selected
0 commit comments