Skip to content

Commit

Permalink
Update visitor.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
arlyon authored Jun 4, 2024
1 parent 12fc319 commit e06c003
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions crates/turbo-static/src/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,23 +76,18 @@ fn extract_tags<'a>(mut meta: impl Iterator<Item = &'a syn::Attribute>) -> Optio

#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd)]
pub enum CallingStyle {
Once,
Once = 0b0010,
#[allow(dead_code)]
ZeroOrOnce,
ZeroOrOnce = 0b0011,
#[allow(dead_code)]
ZeroOrMore,
ZeroOrMore = 0b0111,
#[allow(dead_code)]
OneOrMore,
OneOrMore = 0b0110,
}

impl CallingStyle {
fn bitset(self) -> u8 {
match self {
CallingStyle::Once => 0b0010,
CallingStyle::ZeroOrOnce => 0b011,
CallingStyle::ZeroOrMore => 0b0111,
CallingStyle::OneOrMore => 0b0110,
}
self as u8
}
}

Expand Down

0 comments on commit e06c003

Please sign in to comment.