Skip to content

Commit

Permalink
Apply nightly rustfmt (#607)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi authored Dec 7, 2020
1 parent 5115146 commit 899324c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions crates/lang/ir/src/ir/item_impl/constructor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ impl Constructor {
method_item.attrs.clone(),
&ir::AttributeArgKind::Constructor,
|kind| {
!matches!(kind,
ir::AttributeArgKind::Constructor
| ir::AttributeArgKind::Selector(_)
!matches!(
kind,
ir::AttributeArgKind::Constructor | ir::AttributeArgKind::Selector(_)
)
},
)
Expand Down
7 changes: 4 additions & 3 deletions crates/lang/ir/src/ir/item_impl/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,11 @@ impl Message {
method_item.attrs.clone(),
&ir::AttributeArgKind::Message,
|kind| {
!matches!(kind,
!matches!(
kind,
ir::AttributeArgKind::Message
| ir::AttributeArgKind::Payable
| ir::AttributeArgKind::Selector(_)
| ir::AttributeArgKind::Payable
| ir::AttributeArgKind::Selector(_)
)
},
)
Expand Down
6 changes: 5 additions & 1 deletion crates/lang/ir/src/ir/item_impl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ impl TryFrom<syn::ItemImpl> for ItemImpl {
err.into_combine(format_err!(impl_block_span, "at this invocation",))
})?;
normalized.ensure_no_conflicts(|arg| {
!matches!(arg.kind(), ir::AttributeArgKind::Implementation | ir::AttributeArgKind::Namespace(_))
!matches!(
arg.kind(),
ir::AttributeArgKind::Implementation
| ir::AttributeArgKind::Namespace(_)
)
})?;
namespace = normalized.namespace();
}
Expand Down

0 comments on commit 899324c

Please sign in to comment.