Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/attr.rs')
-rw-r--r--crates/hir-def/src/attr.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir-def/src/attr.rs b/crates/hir-def/src/attr.rs
index b509e69b0d..53250510f8 100644
--- a/crates/hir-def/src/attr.rs
+++ b/crates/hir-def/src/attr.rs
@@ -377,10 +377,10 @@ fn parse_repr_tt(tt: &crate::tt::TopSubtree) -> Option<ReprOptions> {
let mut align = None;
if let Some(TtElement::Subtree(_, mut tt_iter)) = tts.peek() {
tts.next();
- if let Some(TtElement::Leaf(tt::Leaf::Literal(lit))) = tt_iter.next() {
- if let Ok(a) = lit.symbol.as_str().parse() {
- align = Align::from_bytes(a).ok();
- }
+ if let Some(TtElement::Leaf(tt::Leaf::Literal(lit))) = tt_iter.next()
+ && let Ok(a) = lit.symbol.as_str().parse()
+ {
+ align = Align::from_bytes(a).ok();
}
}
ReprOptions { align, ..Default::default() }