Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle-term: Optimize impl of VStack::children()
Matthias Beyer committed 8 months ago
commit 19c484e956e6c0339c4cfc5ed3830f2446d3d1b3
parent 93388e366c85ce151febeeb7e80c9c28a57ddf61
1 file changed +3 -4
modified crates/radicle-term/src/vstack.rs
@@ -77,10 +77,9 @@ impl<'a> VStack<'a> {
        I: IntoIterator<Item = Box<dyn Element>>,
    {
        let mut vstack = self;
-

-
        for child in children.into_iter() {
-
            vstack = vstack.child(child);
-
        }
+
        vstack
+
            .rows
+
            .extend(children.into_iter().map(|e| Row::Element(Box::new(e))));
        vstack
    }