aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/yellow/builder.rs
diff options
context:
space:
mode:
authorJeremy A. Kolb <[email protected]>2018-10-15 22:44:23 +0100
committerJeremy A. Kolb <[email protected]>2018-10-16 14:41:10 +0100
commit61f3a438d3a729a6be941bca1ff4c6a97a33f221 (patch)
tree6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_syntax/src/yellow/builder.rs
parent39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff)
Cargo Format
Run `cargo fmt` and ignore generated files
Diffstat (limited to 'crates/ra_syntax/src/yellow/builder.rs')
-rw-r--r--crates/ra_syntax/src/yellow/builder.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/yellow/builder.rs b/crates/ra_syntax/src/yellow/builder.rs
index 67a1a382b..d64053409 100644
--- a/crates/ra_syntax/src/yellow/builder.rs
+++ b/crates/ra_syntax/src/yellow/builder.rs
@@ -1,10 +1,9 @@
1use rowan::GreenNodeBuilder;
2use crate::{ 1use crate::{
3 TextUnit, SmolStr,
4 parser_impl::Sink, 2 parser_impl::Sink,
5 yellow::{GreenNode, SyntaxError, RaTypes}, 3 yellow::{GreenNode, RaTypes, SyntaxError},
6 SyntaxKind, 4 SmolStr, SyntaxKind, TextUnit,
7}; 5};
6use rowan::GreenNodeBuilder;
8 7
9pub(crate) struct GreenBuilder { 8pub(crate) struct GreenBuilder {
10 errors: Vec<SyntaxError>, 9 errors: Vec<SyntaxError>,
@@ -36,7 +35,10 @@ impl Sink for GreenBuilder {
36 } 35 }
37 36
38 fn error(&mut self, message: String, offset: TextUnit) { 37 fn error(&mut self, message: String, offset: TextUnit) {
39 let error = SyntaxError { msg: message, offset }; 38 let error = SyntaxError {
39 msg: message,
40 offset,
41 };
40 self.errors.push(error) 42 self.errors.push(error)
41 } 43 }
42 44