Skip to content

Commit 513c959

Browse files
committed
clippy
1 parent 5f85ceb commit 513c959

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crdt/src/doc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl Docs {
6666
pub fn docs(&self) -> impl Iterator<Item = Result<DocId>> + '_ {
6767
self.0.iter().filter_map(|(k, _)| {
6868
if k[32] == 1 {
69-
Some(Ok(DocId::new((&k[..32]).try_into().unwrap())))
69+
Some(Ok(DocId::new(k[..32].try_into().unwrap())))
7070
} else {
7171
None
7272
}
@@ -76,7 +76,7 @@ impl Docs {
7676
pub fn keys(&self) -> impl Iterator<Item = Result<PeerId>> + '_ {
7777
self.0.iter().filter_map(|(k, _)| {
7878
if k[32] == 2 {
79-
Some(Ok(PeerId::new((&k[..32]).try_into().unwrap())))
79+
Some(Ok(PeerId::new(k[..32].try_into().unwrap())))
8080
} else {
8181
None
8282
}

0 commit comments

Comments
 (0)