fixed cloned
This commit is contained in:
parent
2888e45fea
commit
02c5b0343b
@ -665,7 +665,7 @@ mod tests {
|
|||||||
assert_eq!(crdt.table[&d.id].version, 2);
|
assert_eq!(crdt.table[&d.id].version, 2);
|
||||||
}
|
}
|
||||||
fn sorted(ls: &Vec<ReplicatedData>) -> Vec<ReplicatedData> {
|
fn sorted(ls: &Vec<ReplicatedData>) -> Vec<ReplicatedData> {
|
||||||
let mut copy: Vec<_> = ls.iter().map(|x| x.clone()).collect();
|
let mut copy: Vec<_> = ls.iter().cloned().collect();
|
||||||
copy.sort_by(|x, y| x.id.cmp(&y.id));
|
copy.sort_by(|x, y| x.id.cmp(&y.id));
|
||||||
copy
|
copy
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user