Remove unnecessary filter map

This commit is contained in:
Sebastian Martinez
2025-06-11 18:24:27 +02:00
committed by Rūdolfs Ošiņš
parent a6ea607c3a
commit 1e1810b78a
+3 -4
View File
@@ -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<_>>();