From 12e3b4c70b5ef23b2fdfc197296d483680e125f9 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 8 Feb 2019 14:49:43 +0300 Subject: reformat the world --- crates/ra_syntax/src/yellow/syntax_error.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'crates/ra_syntax/src/yellow/syntax_error.rs') diff --git a/crates/ra_syntax/src/yellow/syntax_error.rs b/crates/ra_syntax/src/yellow/syntax_error.rs index c52c44cc3..412cf82cc 100644 --- a/crates/ra_syntax/src/yellow/syntax_error.rs +++ b/crates/ra_syntax/src/yellow/syntax_error.rs @@ -28,10 +28,7 @@ impl Into for TextRange { impl SyntaxError { pub fn new>(kind: SyntaxErrorKind, loc: L) -> SyntaxError { - SyntaxError { - kind, - location: loc.into(), - } + SyntaxError { kind, location: loc.into() } } pub fn kind(&self) -> SyntaxErrorKind { @@ -119,10 +116,9 @@ impl fmt::Display for SyntaxErrorKind { InvalidByteEscape => write!(f, "Invalid escape sequence"), TooShortByteCodeEscape => write!(f, "Escape sequence should have two digits"), MalformedByteCodeEscape => write!(f, "Escape sequence should be a hexadecimal number"), - UnicodeEscapeForbidden => write!( - f, - "Unicode escapes are not allowed in byte literals or byte strings" - ), + UnicodeEscapeForbidden => { + write!(f, "Unicode escapes are not allowed in byte literals or byte strings") + } TooShortAsciiCodeEscape => write!(f, "Escape sequence should have two digits"), AsciiCodeEscapeOutOfRange => { write!(f, "Escape sequence should be between \\x00 and \\x7F") -- cgit v1.2.3