We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f85ceb commit 513c959Copy full SHA for 513c959
crdt/src/doc.rs
@@ -66,7 +66,7 @@ impl Docs {
66
pub fn docs(&self) -> impl Iterator<Item = Result<DocId>> + '_ {
67
self.0.iter().filter_map(|(k, _)| {
68
if k[32] == 1 {
69
- Some(Ok(DocId::new((&k[..32]).try_into().unwrap())))
+ Some(Ok(DocId::new(k[..32].try_into().unwrap())))
70
} else {
71
None
72
}
@@ -76,7 +76,7 @@ impl Docs {
76
pub fn keys(&self) -> impl Iterator<Item = Result<PeerId>> + '_ {
77
78
if k[32] == 2 {
79
- Some(Ok(PeerId::new((&k[..32]).try_into().unwrap())))
+ Some(Ok(PeerId::new(k[..32].try_into().unwrap())))
80
81
82
0 commit comments