Radish alpha
h
Radicle Heartwood Protocol & Stack
Radicle
Git (anonymous pull)
Log in to clone via SSH
radicle-term: Pass in `mut self` rather than rebinding
✗ CI failure Matthias Beyer committed 8 months ago
commit 55cdd880bfee08124d5b6a38cc05036402c7ab6e
parent 19c484e956e6c0339c4cfc5ed3830f2446d3d1b3
3 passed 1 failed (4 total) View logs
1 file changed +3 -5
modified crates/radicle-term/src/vstack.rs
@@ -72,15 +72,13 @@ impl<'a> VStack<'a> {
    }

    /// Add multiple elements to the stack.
-
    pub fn children<I>(self, children: I) -> Self
+
    pub fn children<I>(mut self, children: I) -> Self
    where
        I: IntoIterator<Item = Box<dyn Element>>,
    {
-
        let mut vstack = self;
-
        vstack
-
            .rows
+
        self.rows
            .extend(children.into_iter().map(|e| Row::Element(Box::new(e))));
-
        vstack
+
        self
    }

    /// Merge with another `VStack`.