diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-11-21 16:03:15 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-11-21 16:03:15 +0100 |
| commit | 863a1a7a00a67185660a14fb216e615db2b3eead (patch) | |
| tree | a6caa0e6a6e0dcf08be5c29e3b84aa2d2a0d0bae /src/layout/actions.rs | |
| parent | f24e9b44e0ceb19be6f4e16af2d22815e9ccf5b7 (diff) | |
Completed stack and flex refactoring 🔋
Diffstat (limited to 'src/layout/actions.rs')
| -rw-r--r-- | src/layout/actions.rs | 7 |
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. |
