summaryrefslogtreecommitdiff
path: root/src/layout/actions.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-11-21 16:03:15 +0100
committerLaurenz <laurmaedje@gmail.com>2019-11-21 16:03:15 +0100
commit863a1a7a00a67185660a14fb216e615db2b3eead (patch)
treea6caa0e6a6e0dcf08be5c29e3b84aa2d2a0d0bae /src/layout/actions.rs
parentf24e9b44e0ceb19be6f4e16af2d22815e9ccf5b7 (diff)
Completed stack and flex refactoring 🔋
Diffstat (limited to 'src/layout/actions.rs')
-rw-r--r--src/layout/actions.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/layout/actions.rs b/src/layout/actions.rs
index ed3bc182..c668cf75 100644
--- a/src/layout/actions.rs
+++ b/src/layout/actions.rs
@@ -133,9 +133,10 @@ impl LayoutActionList {
self.actions.is_empty()
}
- /// Return the list of actions as a vector.
- pub fn into_vec(self) -> Vec<LayoutAction> {
- self.actions
+ /// Return the list of actions as a vector, leaving an empty
+ /// vector in its position.
+ pub fn to_vec(&mut self) -> Vec<LayoutAction> {
+ std::mem::replace(&mut self.actions, vec![])
}
/// Append a cached move action if one is cached.