-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
impl crdt types #420
impl crdt types #420
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clippy found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
@forehalo does this crate help? https://docs.rs/crdts/latest/crdts/ |
@@ -90,6 +100,21 @@ impl StructInfo { | |||
matches!(self, Self::Item { .. }) | |||
} | |||
|
|||
pub fn flags(&self) -> ItemFlags { | |||
match self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let
} | ||
|
||
pub fn insert(&mut self, index: usize, text: String) { | ||
let pos = self.find_position(index); |
Check warning
Code scanning / clippy
unused variable: `pos`
self.inner.borrow().len | ||
} | ||
|
||
pub fn insert(&mut self, index: usize, text: String) { |
Check warning
Code scanning / clippy
unused variable: `text`
let pos = self.find_position(index); | ||
} | ||
|
||
fn find_position(&self, index: usize) -> Option<Item> { |
Check warning
Code scanning / clippy
unused variable: `index`
Ok(()) | ||
} | ||
|
||
pub fn split_item<I: Into<Id>>(&mut self, id: I, diff: u64) -> JwstCodecResult { |
Check warning
Code scanning / clippy
method `split_item` is never used
|
||
use super::{TypeStore, TypeStoreKind, TypeStoreRef}; | ||
|
||
pub struct YText { |
Check warning
Code scanning / clippy
field `inner` is never read
use super::{TypeStore, TypeStoreKind, TypeStoreRef}; | ||
|
||
pub struct YText { | ||
inner: TypeStoreRef, |
Check warning
Code scanning / clippy
field `inner` is never read
} | ||
|
||
impl YText { | ||
pub fn len(&self) -> usize { |
Check warning
Code scanning / clippy
method `len` is never used
need more discussion |
in these pr, there several things would be done:
will close #405, close #409