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
Matthias Beyer committed 7 months ago
commit 0e299b5590062656371c7f0ac051863301371611
parent 02e6a17f79601f51d308eac1ec6d994bf9a27e09
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`.