mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Cargo Format
Run `cargo fmt` and ignore generated files
This commit is contained in:
parent
39cb6c6d3f
commit
61f3a438d3
76 changed files with 1936 additions and 1530 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue