From 76269a8ca7b0eab4f8c4b1aa5cd769e216793908 Mon Sep 17 00:00:00 2001 From: Zixuan Chen Date: Fri, 14 Oct 2022 01:53:25 +0800 Subject: [PATCH] chore: cargo fix --- crates/loro-core/src/container/text/tracker.rs | 2 +- crates/loro-core/src/container/text/tracker/content_map.rs | 2 +- crates/loro-core/src/container/text/tracker/y_span.rs | 2 +- crates/rle/src/rle_tree/cursor.rs | 2 +- crates/rle/src/rle_tree/iter.rs | 2 +- crates/rle/src/rle_tree/test/notify_prop_test.rs | 5 ++--- 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/loro-core/src/container/text/tracker.rs b/crates/loro-core/src/container/text/tracker.rs index d98343ad..7082762f 100644 --- a/crates/loro-core/src/container/text/tracker.rs +++ b/crates/loro-core/src/container/text/tracker.rs @@ -1,4 +1,4 @@ -use fxhash::FxHashSet; + use rle::{HasLength, RleVec}; use crate::{ diff --git a/crates/loro-core/src/container/text/tracker/content_map.rs b/crates/loro-core/src/container/text/tracker/content_map.rs index 83e693f0..0a3ca59c 100644 --- a/crates/loro-core/src/container/text/tracker/content_map.rs +++ b/crates/loro-core/src/container/text/tracker/content_map.rs @@ -7,7 +7,7 @@ use rle::{ use crate::{id::ID, span::IdSpan}; -use super::y_span::{Status, StatusChange, YSpan, YSpanTreeTrait}; +use super::y_span::{StatusChange, YSpan, YSpanTreeTrait}; /// It stores all the [YSpan] data, including the deleted/undo ones /// diff --git a/crates/loro-core/src/container/text/tracker/y_span.rs b/crates/loro-core/src/container/text/tracker/y_span.rs index f6a9b78b..8f3d8d19 100644 --- a/crates/loro-core/src/container/text/tracker/y_span.rs +++ b/crates/loro-core/src/container/text/tracker/y_span.rs @@ -1,4 +1,4 @@ -use std::thread::panicking; + use crate::{id::Counter, span::IdSpan, ContentType, InsertContent, ID}; use rle::{rle_tree::tree_trait::CumulateTreeTrait, HasLength, Mergable, Sliceable}; diff --git a/crates/rle/src/rle_tree/cursor.rs b/crates/rle/src/rle_tree/cursor.rs index a6b59df0..ebce6c1d 100644 --- a/crates/rle/src/rle_tree/cursor.rs +++ b/crates/rle/src/rle_tree/cursor.rs @@ -1,4 +1,4 @@ -use std::{hash::Hash, marker::PhantomData, ops::Deref, ptr::NonNull}; +use std::{hash::Hash, marker::PhantomData, ptr::NonNull}; use crdt_list::crdt::GetOp; diff --git a/crates/rle/src/rle_tree/iter.rs b/crates/rle/src/rle_tree/iter.rs index 7a5916c7..a77db204 100644 --- a/crates/rle/src/rle_tree/iter.rs +++ b/crates/rle/src/rle_tree/iter.rs @@ -1,4 +1,4 @@ -use std::marker::PhantomData; + use crate::Rle; diff --git a/crates/rle/src/rle_tree/test/notify_prop_test.rs b/crates/rle/src/rle_tree/test/notify_prop_test.rs index e6191cd3..a18d5d3f 100644 --- a/crates/rle/src/rle_tree/test/notify_prop_test.rs +++ b/crates/rle/src/rle_tree/test/notify_prop_test.rs @@ -1,10 +1,9 @@ -use num::Zero; + use proptest::prop_compose; use rand::{rngs::StdRng, SeedableRng}; use crate::{ range_map::{RangeMap, WithStartEnd}, - rle_trait::ZeroElement, rle_tree::tree_trait::CumulateTreeTrait, HasLength, Mergable, Sliceable, }; @@ -117,7 +116,7 @@ impl Default for MyNonNull { impl Clone for MyNonNull { fn clone(&self) -> Self { - Self(self.0.clone(), self.1.clone()) + Self(self.0, self.1) } }