Skip to content

Commit

Permalink
Remove dead function 'is_numeric_or_bool'.
Browse files Browse the repository at this point in the history
  • Loading branch information
InsertCreativityHere committed Nov 21, 2023
1 parent 2ff4c72 commit c6f4ceb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 0 additions & 4 deletions src/grammar/elements/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@ impl Primitive {
)
}

pub fn is_numeric_or_bool(&self) -> bool {
self.is_numeric() || matches!(self, Self::Bool)
}

pub fn numeric_bounds(&self) -> Option<(i128, i128)> {
const VARINT62_MIN: i128 = -2_305_843_009_213_693_952; // -2^61
const VARINT62_MAX: i128 = 2_305_843_009_213_693_951; // 2^61 - 1
Expand Down
4 changes: 2 additions & 2 deletions src/grammar/elements/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub struct Sequence {
}

impl Sequence {
pub fn has_fixed_size_numeric_elements(&self) -> bool {
pub fn has_fixed_size_primitive_elements(&self) -> bool {
if self.element_type.is_optional {
false
} else {
Expand All @@ -23,7 +23,7 @@ impl Sequence {
}

if let Types::Primitive(primitive) = definition {
primitive.is_numeric_or_bool() && primitive.fixed_wire_size().is_some()
primitive.fixed_wire_size().is_some()
} else {
false
}
Expand Down

0 comments on commit c6f4ceb

Please sign in to comment.