mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
reformat the world
This commit is contained in:
parent
5cb1d41a30
commit
12e3b4c70b
129 changed files with 727 additions and 2509 deletions
|
@ -41,10 +41,7 @@ impl MockAnalysis {
|
|||
let mut res = MockAnalysis::new();
|
||||
for entry in parse_fixture(fixture) {
|
||||
if entry.text.contains(CURSOR_MARKER) {
|
||||
assert!(
|
||||
position.is_none(),
|
||||
"only one marker (<|>) per fixture is allowed"
|
||||
);
|
||||
assert!(position.is_none(), "only one marker (<|>) per fixture is allowed");
|
||||
position = Some(res.add_file_with_position(&entry.meta, &entry.text));
|
||||
} else {
|
||||
res.add_file(&entry.meta, &entry.text);
|
||||
|
@ -97,9 +94,7 @@ impl MockAnalysis {
|
|||
let other_crate = crate_graph.add_crate_root(file_id);
|
||||
let crate_name = path.parent().unwrap().file_name().unwrap();
|
||||
if let Some(root_crate) = root_crate {
|
||||
crate_graph
|
||||
.add_dep(root_crate, crate_name.into(), other_crate)
|
||||
.unwrap();
|
||||
crate_graph.add_dep(root_crate, crate_name.into(), other_crate).unwrap();
|
||||
}
|
||||
}
|
||||
change.add_file(source_root, file_id, path, Arc::new(contents));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue