From 863a1a7a00a67185660a14fb216e615db2b3eead Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 21 Nov 2019 16:03:15 +0100 Subject: =?UTF-8?q?Completed=20stack=20and=20flex=20refactoring=20?= =?UTF-8?q?=F0=9F=94=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/actions.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/layout/actions.rs') 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 { - self.actions + /// Return the list of actions as a vector, leaving an empty + /// vector in its position. + pub fn to_vec(&mut self) -> Vec { + std::mem::replace(&mut self.actions, vec![]) } /// Append a cached move action if one is cached. -- cgit v1.2.3