Cargo Format

Run `cargo fmt` and ignore generated files
This commit is contained in:
Jeremy A. Kolb 2018-10-15 17:44:23 -04:00
parent 39cb6c6d3f
commit 61f3a438d3
76 changed files with 1936 additions and 1530 deletions

View file

@ -1,12 +1,8 @@
use ra_syntax::{File, TextUnit, TextRange};
pub use crate::_test_utils::*;
use crate::LocalEdit;
pub use crate::_test_utils::*;
use ra_syntax::{File, TextRange, TextUnit};
pub fn check_action<F: Fn(&File, TextUnit) -> Option<LocalEdit>> (
before: &str,
after: &str,
f: F,
) {
pub fn check_action<F: Fn(&File, TextUnit) -> Option<LocalEdit>>(before: &str, after: &str, f: F) {
let (before_cursor_pos, before) = extract_offset(before);
let file = File::parse(&before);
let result = f(&file, before_cursor_pos).expect("code action is not applicable");
@ -19,7 +15,7 @@ pub fn check_action<F: Fn(&File, TextUnit) -> Option<LocalEdit>> (
assert_eq_text!(after, &actual);
}
pub fn check_action_range<F: Fn(&File, TextRange) -> Option<LocalEdit>> (
pub fn check_action_range<F: Fn(&File, TextRange) -> Option<LocalEdit>>(
before: &str,
after: &str,
f: F,