Skip to content

Commit

Permalink
clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rklaehn committed Jan 31, 2022
1 parent 5f85ceb commit 513c959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crdt/src/doc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl Docs {
pub fn docs(&self) -> impl Iterator<Item = Result<DocId>> + '_ {
self.0.iter().filter_map(|(k, _)| {
if k[32] == 1 {
Some(Ok(DocId::new((&k[..32]).try_into().unwrap())))
Some(Ok(DocId::new(k[..32].try_into().unwrap())))
} else {
None
}
Expand All @@ -76,7 +76,7 @@ impl Docs {
pub fn keys(&self) -> impl Iterator<Item = Result<PeerId>> + '_ {
self.0.iter().filter_map(|(k, _)| {
if k[32] == 2 {
Some(Ok(PeerId::new((&k[..32]).try_into().unwrap())))
Some(Ok(PeerId::new(k[..32].try_into().unwrap())))
} else {
None
}
Expand Down

0 comments on commit 513c959

Please sign in to comment.