Skip to content

Commit 7407782

Browse files
committed
chore: format
1 parent 8d61c73 commit 7407782

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

ilex/src/report/builtin.rs

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ impl Builtins<'_> {
4343
.error(f!(
4444
"unexpected {} in {}",
4545
found.for_user_diagnostic(self.spec),
46-
unexpected_in
47-
.into()
48-
.for_user_diagnostic(self.spec),
46+
unexpected_in.into().for_user_diagnostic(self.spec),
4947
))
5048
.at(at)
5149
.reported_at(Location::caller());
@@ -82,9 +80,7 @@ impl Builtins<'_> {
8280
.error(f!(
8381
"extraneous character{} after {}",
8482
plural(found.chars().count()),
85-
unexpected_in
86-
.into()
87-
.for_user_diagnostic(self.spec),
83+
unexpected_in.into().for_user_diagnostic(self.spec),
8884
))
8985
.at(at)
9086
.remark(
@@ -137,10 +133,7 @@ impl Builtins<'_> {
137133

138134
let diagnostic = self
139135
.report
140-
.error(f!(
141-
"unexpected closing {}",
142-
found.for_user_diagnostic(self.spec)
143-
))
136+
.error(f!("unexpected closing {}", found.for_user_diagnostic(self.spec)))
144137
.saying(at, f!("expected to be opened by `{expected}`"))
145138
.reported_at(Location::caller());
146139

@@ -186,9 +179,7 @@ impl Builtins<'_> {
186179
.report
187180
.error(f!(
188181
"unexpected non-ASCII characters in {}",
189-
expected
190-
.into()
191-
.for_user_diagnostic(self.spec)
182+
expected.into().for_user_diagnostic(self.spec)
192183
))
193184
.at(at)
194185
.reported_at(Location::caller())
@@ -260,10 +251,7 @@ impl Builtins<'_> {
260251

261252
self
262253
.report
263-
.error(f!(
264-
"{} out of span",
265-
what.into().for_user_diagnostic(self.spec)
266-
))
254+
.error(f!("{} out of span", what.into().for_user_diagnostic(self.spec)))
267255
.at(at)
268256
.note(f!(
269257
"expected value in the span {start}{}..{}{end}",

ilex/src/rt/lexer.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,10 @@ impl<'a, 'ctx> Lexer<'a, 'ctx> {
281281
.unclosed(open, &close.close, Lexeme::eof(), self.eof());
282282
}
283283

284-
token::Stream { file: self.file, spec: self.spec, toks: self.tokens }
284+
token::Stream {
285+
file: self.file,
286+
spec: self.spec,
287+
toks: self.tokens,
288+
}
285289
}
286290
}

ilex/src/token/mod.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -648,11 +648,7 @@ impl<'lex> Digital<'lex> {
648648
/// Parse failures become diagnostics, and an unspecified value is provided
649649
/// for a failed integer.
650650
#[track_caller]
651-
pub fn to_int<N>(
652-
self,
653-
range: impl RangeBounds<N>,
654-
report: &Report,
655-
) -> N
651+
pub fn to_int<N>(self, range: impl RangeBounds<N>, report: &Report) -> N
656652
where
657653
N: Bounded + PartialOrd + FromRadix + fmt::Display,
658654
{
@@ -679,11 +675,7 @@ impl<'lex> Digital<'lex> {
679675
/// Parse failures become diagnostics, and an unspecified value is provided
680676
/// for a failed integer.
681677
#[track_caller]
682-
pub fn to_ints<N>(
683-
self,
684-
range: impl RangeBounds<N>,
685-
report: &Report,
686-
) -> Vec<N>
678+
pub fn to_ints<N>(self, range: impl RangeBounds<N>, report: &Report) -> Vec<N>
687679
where
688680
N: Bounded + PartialOrd + FromRadix + fmt::Display,
689681
{
@@ -1010,7 +1002,7 @@ impl<'lex> Quoted<'lex> {
10101002
pub fn unique_content(self) -> Option<Content> {
10111003
match self.content_slice() {
10121004
[unique] => Some(*unique),
1013-
_ => None
1005+
_ => None,
10141006
}
10151007
}
10161008

0 commit comments

Comments
 (0)