diff --git a/crates/radicle-types/src/cobs/patch.rs b/crates/radicle-types/src/cobs/patch.rs index 48e54061a..b76092d6a 100644 --- a/crates/radicle-types/src/cobs/patch.rs +++ b/crates/radicle-types/src/cobs/patch.rs @@ -181,7 +181,7 @@ impl Revision { .map(|(emoji, authors)| { cobs::thread::Reaction::new( *emoji, - authors.into_iter().map(|a| a.into()).collect::>(), + authors.into_iter().map(Into::into).collect::>(), location .as_ref() .map(|l| cobs::thread::CodeLocation::new(l.clone())), diff --git a/crates/radicle-types/src/cobs/thread.rs b/crates/radicle-types/src/cobs/thread.rs index d4a4d50c8..8d70375f6 100644 --- a/crates/radicle-types/src/cobs/thread.rs +++ b/crates/radicle-types/src/cobs/thread.rs @@ -70,7 +70,7 @@ impl Comment { .map(|(reaction, authors)| { cobs::thread::Reaction::new( *reaction, - authors.into_iter().map(|s| s.into()).collect(), + authors.into_iter().map(Into::into).collect(), None, aliases, ) @@ -108,7 +108,7 @@ impl Comment { .map(|(reaction, authors)| { cobs::thread::Reaction::new( *reaction, - authors.into_iter().map(|m| m.into()).collect::>(), + authors.into_iter().map(Into::into).collect::>(), None, aliases, ) diff --git a/crates/radicle-types/src/traits/issue.rs b/crates/radicle-types/src/traits/issue.rs index 1e7b5137b..bc88180c8 100644 --- a/crates/radicle-types/src/traits/issue.rs +++ b/crates/radicle-types/src/traits/issue.rs @@ -110,7 +110,7 @@ pub trait IssuesMut: Profile { new.description, &new.labels, &new.assignees, - new.embeds.into_iter().map(|e| e.into()).collect::>(), + new.embeds.into_iter().map(Into::into).collect::>(), &signer, )?; @@ -164,7 +164,7 @@ pub trait IssuesMut: Profile { issue.comment( body, reply_to.unwrap_or(cob_id), - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -172,7 +172,7 @@ pub trait IssuesMut: Profile { issue.edit_comment( id, body, - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } diff --git a/crates/radicle-types/src/traits/patch.rs b/crates/radicle-types/src/traits/patch.rs index 4e2879ec7..1cb3f7b23 100644 --- a/crates/radicle-types/src/traits/patch.rs +++ b/crates/radicle-types/src/traits/patch.rs @@ -129,7 +129,7 @@ pub trait PatchesMut: Profile { patch.edit_revision( revision, description, - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -187,7 +187,7 @@ pub trait PatchesMut: Profile { body, location.map(|l| l.into()), reply_to, - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -201,7 +201,7 @@ pub trait PatchesMut: Profile { review, comment, body, - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -240,7 +240,7 @@ pub trait PatchesMut: Profile { body, reply_to, location.map(|l| l.into()), - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -254,7 +254,7 @@ pub trait PatchesMut: Profile { revision, comment, body, - embeds.into_iter().map(|e| e.into()).collect::>(), + embeds.into_iter().map(Into::into).collect::>(), &signer, )?; } @@ -409,7 +409,7 @@ pub trait PatchesMut: Profile { new.body, new.location.map(|l| l.into()), new.reply_to, - new.embeds.into_iter().map(|e| e.into()).collect::>(), + new.embeds.into_iter().map(Into::into).collect::>(), )?; Ok(()) diff --git a/crates/radicle-types/src/traits/thread.rs b/crates/radicle-types/src/traits/thread.rs index 5a12fbb39..fa2ad4ba8 100644 --- a/crates/radicle-types/src/traits/thread.rs +++ b/crates/radicle-types/src/traits/thread.rs @@ -57,7 +57,7 @@ pub trait Thread: Profile { let oid = issue.comment( n.body, id, - n.embeds.into_iter().map(|e| e.into()).collect::>(), + n.embeds.into_iter().map(Into::into).collect::>(), &signer, )?; @@ -72,7 +72,7 @@ pub trait Thread: Profile { new.body, id.into(), None, - new.embeds.into_iter().map(|e| e.into()).collect::>(), + new.embeds.into_iter().map(Into::into).collect::>(), LocalTime::now().into(), ), aliases, @@ -98,7 +98,7 @@ pub trait Thread: Profile { n.body, n.reply_to, n.location.map(|l| l.into()), - n.embeds.into_iter().map(|e| e.into()).collect::>(), + n.embeds.into_iter().map(Into::into).collect::>(), &signer, )?; @@ -113,7 +113,7 @@ pub trait Thread: Profile { new.body, new.reply_to, new.location.map(|l| l.into()), - new.embeds.into_iter().map(|e| e.into()).collect::>(), + new.embeds.into_iter().map(Into::into).collect::>(), LocalTime::now().into(), ), aliases,