diff options
Diffstat (limited to 'common/object')
| -rw-r--r-- | common/object/src/lib.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/object/src/lib.rs b/common/object/src/lib.rs index 98e4834..ae8d1cd 100644 --- a/common/object/src/lib.rs +++ b/common/object/src/lib.rs @@ -240,6 +240,11 @@ impl<'a> Object<'a> { self.insert_multi(tag, &[value]) } #[must_use] + #[inline] + pub fn remove<T: ValueStore>(&self, tag: TypedTag<T>) -> ObjectBuffer { + self.insert_multi(tag, &[]) + } + #[must_use] pub fn insert_multi<T: ValueStore>(&self, tag: TypedTag<T>, values: &[T]) -> ObjectBuffer { let prefix = self.tags.partition_point(|&x| x < tag.0.0); let suffix = self.tags.partition_point(|&x| x <= tag.0.0); |