Radish alpha
r
Radicle desktop app
Radicle
Git (anonymous pull)
Log in to clone via SSH
Use `Into::into` instead of a closure in `radicle-types`
Sebastian Martinez committed 1 year ago
commit 46703705626c71fa43b9fe95feaa78f65beaf334
parent c176fb9a3d2d6649b7fb6fd88f167eaf87cb5898
5 files changed +16 -16
modified 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::<Vec<_>>(),
+
                                authors.into_iter().map(Into::into).collect::<Vec<_>>(),
                                location
                                    .as_ref()
                                    .map(|l| cobs::thread::CodeLocation::new(l.clone())),
modified crates/radicle-types/src/cobs/thread.rs
@@ -70,7 +70,7 @@ impl Comment<CodeLocation> {
                .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<cobs::Never> {
                .map(|(reaction, authors)| {
                    cobs::thread::Reaction::new(
                        *reaction,
-
                        authors.into_iter().map(|m| m.into()).collect::<Vec<_>>(),
+
                        authors.into_iter().map(Into::into).collect::<Vec<_>>(),
                        None,
                        aliases,
                    )
modified 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::<Vec<_>>(),
+
            new.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
            &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::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &signer,
                )?;
            }
@@ -172,7 +172,7 @@ pub trait IssuesMut: Profile {
                issue.edit_comment(
                    id,
                    body,
-
                    embeds.into_iter().map(|e| e.into()).collect::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &signer,
                )?;
            }
modified 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::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &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::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &signer,
                )?;
            }
@@ -201,7 +201,7 @@ pub trait PatchesMut: Profile {
                    review,
                    comment,
                    body,
-
                    embeds.into_iter().map(|e| e.into()).collect::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &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::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &signer,
                )?;
            }
@@ -254,7 +254,7 @@ pub trait PatchesMut: Profile {
                    revision,
                    comment,
                    body,
-
                    embeds.into_iter().map(|e| e.into()).collect::<Vec<_>>(),
+
                    embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                    &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::<Vec<_>>(),
+
                new.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
            )?;

            Ok(())
modified 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::<Vec<_>>(),
+
            n.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
            &signer,
        )?;

@@ -72,7 +72,7 @@ pub trait Thread: Profile {
                new.body,
                id.into(),
                None,
-
                new.embeds.into_iter().map(|e| e.into()).collect::<Vec<_>>(),
+
                new.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                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::<Vec<_>>(),
+
            n.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
            &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::<Vec<_>>(),
+
                new.embeds.into_iter().map(Into::into).collect::<Vec<_>>(),
                LocalTime::now().into(),
            ),
            aliases,