Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit aa11c27

Browse files
chore: run rustfmt
1 parent d00849e commit aa11c27

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/attr.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,14 @@ pub(crate) fn contains_name(attrs: &[ast::Attribute], name: Symbol) -> bool {
2222
attrs.iter().any(|attr| attr.has_name(name))
2323
}
2424

25-
pub(crate) fn first_attr_value_str_by_name(attrs: &[ast::Attribute], name: Symbol) -> Option<Symbol> {
26-
attrs.iter().find(|attr| attr.has_name(name)).and_then(|attr| attr.value_str())
25+
pub(crate) fn first_attr_value_str_by_name(
26+
attrs: &[ast::Attribute],
27+
name: Symbol,
28+
) -> Option<Symbol> {
29+
attrs
30+
.iter()
31+
.find(|attr| attr.has_name(name))
32+
.and_then(|attr| attr.value_str())
2733
}
2834

2935
/// Returns attributes on the given statement.

src/syntux/parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use rustc_ast::ast;
55
use rustc_ast::token::{DelimToken, TokenKind};
66
use rustc_errors::Diagnostic;
77
use rustc_parse::{new_parser_from_file, parser::Parser as RawParser};
8-
use rustc_span::{symbol::kw, sym, Span};
8+
use rustc_span::{sym, symbol::kw, Span};
99

1010
use crate::attr::first_attr_value_str_by_name;
1111
use crate::syntux::session::ParseSess;

0 commit comments

Comments
 (0)