aboutsummaryrefslogtreecommitdiff
path: root/helix-core
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-08-26 00:26:38 +0000
committerBlaž Hrastnik2021-08-26 00:26:38 +0000
commit68bf9fdf02a2462c57c86a7318987d385a289184 (patch)
treeef9c8d420560ecd1824c68f0cfb6985b975a5322 /helix-core
parent28919898e98541b3305b08d8f05606c060b8ae00 (diff)
Fix tests broken by the State change
Diffstat (limited to 'helix-core')
-rw-r--r--helix-core/src/transaction.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-core/src/transaction.rs b/helix-core/src/transaction.rs
index f465992d..d15db000 100644
--- a/helix-core/src/transaction.rs
+++ b/helix-core/src/transaction.rs
@@ -689,9 +689,9 @@ mod test {
#[test]
fn transaction_change() {
- let mut doc = Rope::from("hello world!\ntest 123".into());
+ let mut doc = Rope::from("hello world!\ntest 123");
let transaction = Transaction::change(
- &state.doc,
+ &doc,
// (1, 1, None) is a useless 0-width delete
vec![(1, 1, None), (6, 11, Some("void".into())), (12, 17, None)].into_iter(),
);
@@ -701,7 +701,7 @@ mod test {
#[test]
fn changes_iter() {
- let doc = Rope::from("hello world!\ntest 123".into());
+ let doc = Rope::from("hello world!\ntest 123");
let changes = vec![(6, 11, Some("void".into())), (12, 17, None)];
let transaction = Transaction::change(&doc, changes.clone().into_iter());
assert_eq!(transaction.changes_iter().collect::<Vec<_>>(), changes);