Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe committed Dec 5, 2023
1 parent 984c722 commit 08ea700
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion macro/src/dialect/operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<'a> Operation<'a> {

match &mut variadic_kind {
VariadicKind::Simple {
seen_variable_length,
variable_length_seen: seen_variable_length,
} => {
if constraint.has_variable_length() {
*seen_variable_length = true;
Expand Down
2 changes: 1 addition & 1 deletion macro/src/dialect/operation/accessors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl<'a> OperationField<'a> {

Some(match variadic_kind {
VariadicKind::Simple {
seen_variable_length,
variable_length_seen: seen_variable_length,
} => {
if constraint.is_optional() {
// Optional element, and some singular elements.
Expand Down
4 changes: 2 additions & 2 deletions macro/src/dialect/operation/variadic_kind.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[derive(Clone, Debug)]
pub enum VariadicKind {
Simple {
seen_variable_length: bool,
variable_length_seen: bool,
},
SameSize {
variable_length_count: usize,
Expand All @@ -15,7 +15,7 @@ impl VariadicKind {
pub fn new(variable_length_count: usize, same_size: bool, attr_sized: bool) -> Self {
if variable_length_count <= 1 {
VariadicKind::Simple {
seen_variable_length: false,
variable_length_seen: false,
}
} else if same_size {
VariadicKind::SameSize {
Expand Down

0 comments on commit 08ea700

Please sign in to comment.