summaryrefslogtreecommitdiff
path: root/helix-core/src/syntax.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-31 06:45:18 +0000
committerBlaž Hrastnik2021-03-31 06:45:18 +0000
commit9eaef6e33376407931162780cd402297c44f26c4 (patch)
treeda14993d99a50f502113befcd0f78538f4e7c716 /helix-core/src/syntax.rs
parentdfc17becd56efbc1f65de7c8d65cb32ad4690db1 (diff)
Fully drop State references.
Diffstat (limited to 'helix-core/src/syntax.rs')
-rw-r--r--helix-core/src/syntax.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/syntax.rs b/helix-core/src/syntax.rs
index b29d6165..6d6fe648 100644
--- a/helix-core/src/syntax.rs
+++ b/helix-core/src/syntax.rs
@@ -1593,7 +1593,7 @@ fn test_input_edits() {
&state.doc,
vec![(6, 11, Some("test".into())), (12, 17, None)].into_iter(),
);
- let edits = LanguageLayer::generate_edits(state.doc.slice(..), &transaction.changes);
+ let edits = LanguageLayer::generate_edits(state.doc.slice(..), transaction.changes());
// transaction.apply(&mut state);
assert_eq!(
@@ -1622,8 +1622,8 @@ fn test_input_edits() {
let mut state = State::new("fn test() {}".into());
let transaction =
Transaction::change(&state.doc, vec![(8, 8, Some("a: u32".into()))].into_iter());
- let edits = LanguageLayer::generate_edits(state.doc.slice(..), &transaction.changes);
- transaction.apply(&mut state);
+ let edits = LanguageLayer::generate_edits(state.doc.slice(..), transaction.changes());
+ transaction.apply(&mut state.doc);
assert_eq!(state.doc, "fn test(a: u32) {}");
assert_eq!(