A simple CPU rendered GUI IDE experience.
Diffstat (limited to 'src/hov.rs')
-rw-r--r--src/hov.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/hov.rs b/src/hov.rs
index ac5debf..2770588 100644
--- a/src/hov.rs
+++ b/src/hov.rs
@@ -8,6 +8,7 @@ use itertools::Itertools;
use markdown::mdast::{self, Node};
use ropey::Rope;
use serde_derive::{Deserialize, Serialize};
+use ttools::{IteratorOfTuples, IteratorOfTuplesWithF};
const D: Cell = Cell { letter: None, style: Style::new(FG, BG) };
use crate::{FG, text};
@@ -221,7 +222,7 @@ pub fn l(node: &Node) -> Vec<usize> {
.into_iter()
.chunk_by(|&x| x != usize::MAX)
.into_iter()
- .filter_map(|x| x.0.then(|| x.1.sum::<usize>()))
+ .filter_map(|(b, g)| b.then(|| g.sum::<usize>()))
.collect::<Vec<_>>()
}
#[implicit_fn::implicit_fn]