diff options
| author | Mason Reed <mason@vector35.com> | 2025-12-09 13:57:08 -0500 |
|---|---|---|
| committer | Mason Reed <35282038+emesare@users.noreply.github.com> | 2025-12-10 17:35:19 -0500 |
| commit | ae02e4cfe187752766a1137b2ce87a5642e89c44 (patch) | |
| tree | e254709666d59bbe0df56f8df9c7b6226a99a257 /rust/src/file_metadata.rs | |
| parent | 393d6dda437d848f51efacceb8618b937d9f08f3 (diff) | |
[Rust] Impl `Display` for `FileMetadata`
Diffstat (limited to 'rust/src/file_metadata.rs')
| -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 {} |
