diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/database.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rust/src/database.rs b/rust/src/database.rs index 09cdde54..3274c9c0 100644 --- a/rust/src/database.rs +++ b/rust/src/database.rs @@ -8,7 +8,7 @@ use crate::binaryview::BinaryView; use crate::databuffer::DataBuffer; use crate::disassembly::InstructionTextToken; use crate::filemetadata::FileMetadata; -use crate::rc::{Array, CoreArrayProvider, CoreArrayProviderInner}; +use crate::rc::{Array, CoreArrayProvider, CoreArrayProviderInner, Ref}; use crate::string::{BnStrCompatible, BnString}; #[repr(transparent)] @@ -180,10 +180,10 @@ impl Database { } /// Get the owning FileMetadata - pub fn file(&self) -> FileMetadata { + pub fn file(&self) -> Ref<FileMetadata> { let result = unsafe { BNGetDatabaseFile(self.as_raw()) }; assert!(!result.is_null()); - FileMetadata::from_raw(result) + unsafe { Ref::new(FileMetadata::from_raw(result)) } } /// Get the backing analysis cache kvs |
