mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-16 03:40:37 +08:00
Remove unnecessary filter map
This commit is contained in:
@@ -7,7 +7,6 @@ use crate::error::Error;
|
||||
use crate::traits::Profile;
|
||||
|
||||
pub trait Cobs: Profile {
|
||||
#[allow(clippy::unnecessary_filter_map)]
|
||||
fn activity_by_id<A: DeserializeOwned, B: FromRadicleAction<A>>(
|
||||
&self,
|
||||
rid: identity::RepoId,
|
||||
@@ -20,7 +19,7 @@ pub trait Cobs: Profile {
|
||||
let iter = cob::store::ops(&id.into(), type_name, &repo)?;
|
||||
let ops = iter
|
||||
.into_iter()
|
||||
.filter_map(|op| {
|
||||
.map(|op| {
|
||||
let actions = op
|
||||
.actions
|
||||
.iter()
|
||||
@@ -36,12 +35,12 @@ pub trait Cobs: Profile {
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
Some(crate::cobs::Operation {
|
||||
crate::cobs::Operation {
|
||||
id: op.id,
|
||||
actions,
|
||||
author: crate::cobs::Author::new(&op.author.into(), &aliases),
|
||||
timestamp: op.timestamp,
|
||||
})
|
||||
}
|
||||
})
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user