Skip to content

Commit

Permalink
Rename Tagged trait to TagProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
kellerkindt committed May 6, 2020
1 parent 9fb0dc0 commit 5b828c4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion asn1rs-model/src/gen/rust/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::model::Model;
use crate::model::Range;
use crate::model::Rust;
use crate::model::RustType;
use crate::model::Tagged;
use crate::model::TagProperty;
use crate::model::{Asn, Definition, Tag, Type as AsnType, Type};
use codegen::Block;
use codegen::Enum;
Expand Down
10 changes: 5 additions & 5 deletions asn1rs-model/src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ impl<T> Definition<T> {
}
}

impl Tagged for Definition<Asn> {
impl TagProperty for Definition<Asn> {
fn tag(&self) -> Option<Tag> {
self.1.tag()
}
Expand All @@ -530,7 +530,7 @@ pub struct Field<T> {
pub role: T,
}

impl<T: Tagged> Tagged for Field<T> {
impl<T: TagProperty> TagProperty for Field<T> {
fn tag(&self) -> Option<Tag> {
self.role.tag()
}
Expand Down Expand Up @@ -583,7 +583,7 @@ impl TryFrom<&mut Peekable<IntoIter<Token>>> for Tag {
}
}

pub trait Tagged {
pub trait TagProperty {
fn tag(&self) -> Option<Tag>;

fn set_tag(&mut self, tag: Tag);
Expand Down Expand Up @@ -649,7 +649,7 @@ impl From<Type> for Asn {
}
}

impl Tagged for Asn {
impl TagProperty for Asn {
fn tag(&self) -> Option<Tag> {
self.tag
}
Expand Down Expand Up @@ -806,7 +806,7 @@ impl ChoiceVariant {
}
}

impl Tagged for ChoiceVariant {
impl TagProperty for ChoiceVariant {
fn tag(&self) -> Option<Tag> {
self.tag
}
Expand Down
4 changes: 2 additions & 2 deletions asn1rs-model/src/model/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::model::Range;
use crate::model::Type as AsnType;
use crate::model::{Asn, ChoiceVariant};
use crate::model::{Definition, Type};
use crate::model::{Import, Tag, Tagged};
use crate::model::{Import, Tag, TagProperty};

const I8_MAX: i64 = i8::max_value() as i64;
const I16_MAX: i64 = i16::max_value() as i64;
Expand Down Expand Up @@ -355,7 +355,7 @@ impl DataVariant {
}
}

impl Tagged for DataVariant {
impl TagProperty for DataVariant {
fn tag(&self) -> Option<Tag> {
self.tag
}
Expand Down

0 comments on commit 5b828c4

Please sign in to comment.