diff options
Diffstat (limited to 'rust/src')
| -rw-r--r-- | rust/src/file_metadata.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/rust/src/file_metadata.rs b/rust/src/file_metadata.rs index 86e28a3e..dc9d36ff 100644 --- a/rust/src/file_metadata.rs +++ b/rust/src/file_metadata.rs @@ -27,7 +27,7 @@ use binaryninjacore_sys::{ }; use binaryninjacore_sys::{BNCreateDatabaseWithProgress, BNOpenExistingDatabaseWithProgress}; use std::ffi::c_void; -use std::fmt::Debug; +use std::fmt::{Debug, Display, Formatter}; use std::path::Path; use crate::progress::ProgressCallback; @@ -375,7 +375,7 @@ impl FileMetadata { } impl Debug for FileMetadata { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("FileMetadata") .field("filename", &self.filename()) .field("session_id", &self.session_id()) @@ -388,6 +388,12 @@ impl Debug for FileMetadata { } } +impl Display for FileMetadata { + fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { + f.write_str(&self.filename()) + } +} + unsafe impl Send for FileMetadata {} unsafe impl Sync for FileMetadata {} |
