From a154e45cce79b0c2264c1e1cd37a3d1bf5bc6154 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Thu, 5 Jan 2023 17:29:14 -0500 Subject: Rust API: Lots and lots of clippy changes --- rust/src/metadata.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'rust/src/metadata.rs') diff --git a/rust/src/metadata.rs b/rust/src/metadata.rs index 120a08b7..b17ba41c 100644 --- a/rust/src/metadata.rs +++ b/rust/src/metadata.rs @@ -1,4 +1,3 @@ -#[allow(non_snake_case)] use crate::rc::{ Array, CoreArrayProvider, CoreArrayWrapper, CoreOwnedArrayProvider, Guard, Ref, RefCountable, }; @@ -236,6 +235,10 @@ impl Metadata { unsafe { BNMetadataSize(self.handle) } } + pub fn is_empty(&self) -> bool { + unsafe { BNMetadataSize(self.handle) == 0 } + } + pub fn index(&self, index: usize) -> Result>, ()> { if self.get_type() != MetadataType::ArrayDataType { return Err(()); -- cgit v1.3.1