Skip to content

Commit 10eb2df

Browse files
committed
[Rust] Impl Debug for BinaryViewType
1 parent 21796e5 commit 10eb2df

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

rust/src/custom_binary_view.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use binaryninjacore_sys::*;
1818

1919
pub use binaryninjacore_sys::BNModificationStatus as ModificationStatus;
2020

21+
use std::fmt::Debug;
2122
use std::marker::PhantomData;
2223
use std::mem::MaybeUninit;
2324
use std::os::raw::c_void;
@@ -381,6 +382,15 @@ impl BinaryViewTypeBase for BinaryViewType {
381382
}
382383
}
383384

385+
impl Debug for BinaryViewType {
386+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
387+
f.debug_struct("BinaryViewType")
388+
.field("name", &self.name())
389+
.field("long_name", &self.long_name())
390+
.finish()
391+
}
392+
}
393+
384394
impl CoreArrayProvider for BinaryViewType {
385395
type Raw = *mut BNBinaryViewType;
386396
type Context = ();

0 commit comments

Comments
 (0)