File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ use crate::binaryview::BinaryView;
88use crate :: databuffer:: DataBuffer ;
99use crate :: disassembly:: InstructionTextToken ;
1010use crate :: filemetadata:: FileMetadata ;
11- use crate :: rc:: { Array , CoreArrayProvider , CoreArrayProviderInner } ;
11+ use crate :: rc:: { Array , CoreArrayProvider , CoreArrayProviderInner , Ref } ;
1212use crate :: string:: { BnStrCompatible , BnString } ;
1313
1414#[ repr( transparent) ]
@@ -180,10 +180,10 @@ impl Database {
180180 }
181181
182182 /// Get the owning FileMetadata
183- pub fn file ( & self ) -> FileMetadata {
183+ pub fn file ( & self ) -> Ref < FileMetadata > {
184184 let result = unsafe { BNGetDatabaseFile ( self . as_raw ( ) ) } ;
185185 assert ! ( !result. is_null( ) ) ;
186- FileMetadata :: from_raw ( result)
186+ unsafe { Ref :: new ( FileMetadata :: from_raw ( result) ) }
187187 }
188188
189189 /// Get the backing analysis cache kvs
You can’t perform that action at this time.
0 commit comments