Skip to content

Commit 8e91e6f

Browse files
committed
fix: relocate brackets to express desired logic
1 parent 7a5fff8 commit 8e91e6f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/app.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,8 @@ impl LogViewerApp {
114114
.rows()
115115
.iter()
116116
.map(|x| {
117-
(1f32).max(
118-
x.field_value("msg").display().lines().count() as f32 * text_height,
119-
)
117+
(1f32).max(x.field_value("msg").display().lines().count() as f32)
118+
* text_height
120119
})
121120
.collect();
122121
body.heterogeneous_rows(heights.into_iter(), |mut row| {
@@ -217,7 +216,7 @@ impl LogViewerApp {
217216
// TODO 3: Figure out if calculating these values only once is worth it.
218217
let heights: Vec<f32> = selected_values
219218
.iter()
220-
.map(|x| (1f32).max(x.1.lines().count() as f32 * text_height))
219+
.map(|x| (1f32).max(x.1.lines().count() as f32) * text_height)
221220
.collect();
222221
body.heterogeneous_rows(heights.iter().cloned(), |mut row| {
223222
let row_index = row.index();

0 commit comments

Comments
 (0)