reformat the world

This commit is contained in:
Aleksey Kladov
2019-02-08 14:49:43 +03:00
parent 5cb1d41a30
commit 12e3b4c70b
129 changed files with 727 additions and 2509 deletions

View File

@@ -29,10 +29,7 @@ pub(crate) fn validate_string_node(node: &ast::String, errors: &mut Vec<SyntaxEr
}
if let Some(range) = components.suffix {
errors.push(SyntaxError::new(
InvalidSuffix,
range + literal_range.start(),
));
errors.push(SyntaxError::new(InvalidSuffix, range + literal_range.start()));
}
}
@@ -48,12 +45,7 @@ mod test {
fn assert_valid_str(literal: &str) {
let file = build_file(literal);
assert!(
file.errors().len() == 0,
"Errors for literal '{}': {:?}",
literal,
file.errors()
);
assert!(file.errors().len() == 0, "Errors for literal '{}': {:?}", literal, file.errors());
}
fn assert_invalid_str(literal: &str) {
@@ -121,13 +113,7 @@ mod test {
#[test]
fn test_valid_unicode_escape() {
let valid = [
r"\u{FF}",
r"\u{0}",
r"\u{F}",
r"\u{10FFFF}",
r"\u{1_0__FF___FF_____}",
];
let valid = [r"\u{FF}", r"\u{0}", r"\u{F}", r"\u{10FFFF}", r"\u{1_0__FF___FF_____}"];
for c in &valid {
assert_valid_str(c);
}