Skip to content

Commit 59405bf

Browse files
committed
cargo format
1 parent fda8ddc commit 59405bf

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

crates/ra_syntax/src/parser_impl/event.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,10 @@ impl<'a, S: Sink> EventProcessor<'a, S> {
162162
.sum::<TextUnit>();
163163
self.leaf(kind, len, n_raw_tokens);
164164
}
165-
Event::Error { msg } => self.sink.error(
166-
SyntaxError::new(SyntaxErrorKind::ParseError(msg), self.text_pos),
167-
),
165+
Event::Error { msg } => self.sink.error(SyntaxError::new(
166+
SyntaxErrorKind::ParseError(msg),
167+
self.text_pos,
168+
)),
168169
}
169170
}
170171
self.sink

crates/ra_syntax/src/yellow/syntax_error.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ impl Into<Location> for TextRange {
2828

2929
impl SyntaxError {
3030
pub fn new<L: Into<Location>>(kind: SyntaxErrorKind, loc: L) -> SyntaxError {
31-
SyntaxError { kind, location: loc.into() }
31+
SyntaxError {
32+
kind,
33+
location: loc.into(),
34+
}
3235
}
3336

3437
pub fn location(&self) -> Location {
@@ -45,7 +48,7 @@ impl SyntaxError {
4548
pub fn add_offset(mut self, plus_offset: TextUnit) -> SyntaxError {
4649
self.location = match self.location {
4750
Location::Range(range) => Location::Range(range + plus_offset),
48-
Location::Offset(offset) => Location::Offset(offset + plus_offset)
51+
Location::Offset(offset) => Location::Offset(offset + plus_offset),
4952
};
5053

5154
self

0 commit comments

Comments
 (0)