diff options
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. |
