summaryrefslogtreecommitdiff
path: root/src/value.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/value.rs')
-rw-r--r--src/value.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/value.rs b/src/value.rs
index e05fb0a..a93abc9 100644
--- a/src/value.rs
+++ b/src/value.rs
@@ -241,6 +241,11 @@ impl<'lua> MultiValue<'lua> {
pub fn iter(&self) -> iter::Rev<slice::Iter<Value<'lua>>> {
self.0.iter().rev()
}
+
+ #[inline]
+ pub(crate) fn drain_all(&mut self) -> iter::Rev<vec::Drain<Value<'lua>>> {
+ self.0.drain(..).rev()
+ }
}
/// Trait for types convertible to any number of Lua values.