Skip to content

Commit be040f6

Browse files
committed
refactor: minor style change
1 parent a7a5233 commit be040f6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/interface/app.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,10 +265,12 @@ impl<'a> App<'a> {
265265
)
266266
.highlight_symbol("-> ");
267267

268-
let selected_element = match self.table.state.selected() {
269-
Some(index) => self.database.get_element(index),
270-
None => None,
271-
};
268+
let selected_element = self
269+
.table
270+
.state
271+
.selected()
272+
.and_then(|i| self.database.get_element(i));
273+
272274
let mut text = if let Some(element) = selected_element {
273275
format!(
274276
"

0 commit comments

Comments
 (0)