summaryrefslogtreecommitdiff
path: root/rust/src/binaryview.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/binaryview.rs')
-rw-r--r--rust/src/binaryview.rs11
1 files changed, 2 insertions, 9 deletions
diff --git a/rust/src/binaryview.rs b/rust/src/binaryview.rs
index 15f3030c..00069c15 100644
--- a/rust/src/binaryview.rs
+++ b/rust/src/binaryview.rs
@@ -679,9 +679,7 @@ pub trait BinaryViewExt: BinaryViewBase {
name: N,
icon: I,
) -> Ref<TagType> {
- let tag_type = TagType::create(self.as_ref());
- tag_type.set_name(name);
- tag_type.set_icon(icon);
+ let tag_type = TagType::create(self.as_ref(), name, icon);
unsafe {
BNAddTagType(self.as_ref().handle, tag_type.handle);
}
@@ -726,12 +724,7 @@ pub trait BinaryViewExt: BinaryViewBase {
}
}
- fn create_tag<S: BnStrCompatible>(
- &self,
- t: &TagType,
- data: S,
- user: bool,
- ) -> Ref<Tag> {
+ fn create_tag<S: BnStrCompatible>(&self, t: &TagType, data: S, user: bool) -> Ref<Tag> {
let tag = Tag::new(t, data);
unsafe { BNAddTag(self.as_ref().handle, tag.handle, user) }
tag