diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-16 14:44:24 +0100 |
commit | 1216878f7be20dd0e652fb8cdc395009fdcfae07 (patch) | |
tree | 6551967cc8c6e921b66071453ad7888a9121d326 /crates/ra_syntax/tests | |
parent | 39cb6c6d3f78b193f5873c3492e530bbd24d5dd2 (diff) | |
parent | 61f3a438d3a729a6be941bca1ff4c6a97a33f221 (diff) |
Merge #134
134: Cargo Format run r=kjeremy a=kjeremy
I'm not sure how appreciated this is but I figured I would run `cargo fmt` and see what came up.
I made sure that `cargo test` still passes.
Co-authored-by: Jeremy A. Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax/tests')
-rw-r--r-- | crates/ra_syntax/tests/test.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_syntax/tests/test.rs b/crates/ra_syntax/tests/test.rs index 27380efef..9d1ded093 100644 --- a/crates/ra_syntax/tests/test.rs +++ b/crates/ra_syntax/tests/test.rs | |||
@@ -4,14 +4,14 @@ extern crate test_utils; | |||
4 | extern crate walkdir; | 4 | extern crate walkdir; |
5 | 5 | ||
6 | use std::{ | 6 | use std::{ |
7 | fmt::Write, | ||
7 | fs, | 8 | fs, |
8 | path::{Path, PathBuf}, | 9 | path::{Path, PathBuf}, |
9 | fmt::Write, | ||
10 | }; | 10 | }; |
11 | 11 | ||
12 | use ra_syntax::{ | 12 | use ra_syntax::{ |
13 | utils::{check_fuzz_invariants, dump_tree}, | ||
13 | File, | 14 | File, |
14 | utils::{dump_tree, check_fuzz_invariants}, | ||
15 | }; | 15 | }; |
16 | 16 | ||
17 | #[test] | 17 | #[test] |
@@ -37,7 +37,6 @@ fn parser_fuzz_tests() { | |||
37 | } | 37 | } |
38 | } | 38 | } |
39 | 39 | ||
40 | |||
41 | /// Read file and normalize newlines. | 40 | /// Read file and normalize newlines. |
42 | /// | 41 | /// |
43 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: | 42 | /// `rustc` seems to always normalize `\r\n` newlines to `\n`: |
@@ -54,8 +53,8 @@ fn read_text(path: &Path) -> String { | |||
54 | } | 53 | } |
55 | 54 | ||
56 | pub fn dir_tests<F>(paths: &[&str], f: F) | 55 | pub fn dir_tests<F>(paths: &[&str], f: F) |
57 | where | 56 | where |
58 | F: Fn(&str) -> String, | 57 | F: Fn(&str) -> String, |
59 | { | 58 | { |
60 | for (path, input_code) in collect_tests(paths) { | 59 | for (path, input_code) in collect_tests(paths) { |
61 | let parse_tree = f(&input_code); | 60 | let parse_tree = f(&input_code); |