From 2d491f4cc8899da9b463bc9b532452ea40516681 Mon Sep 17 00:00:00 2001 From: Nejc Galof Date: Mon, 23 Sep 2024 20:32:20 +0200 Subject: [PATCH] refactor(clippy): apply assigning_clones lint (#876) --- git-cliff-core/src/commit.rs | 2 +- git-cliff/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/git-cliff-core/src/commit.rs b/git-cliff-core/src/commit.rs index 9a9c71d..b178cdb 100644 --- a/git-cliff-core/src/commit.rs +++ b/git-cliff-core/src/commit.rs @@ -349,7 +349,7 @@ impl Commit<'_> { }; self.group = parser.group.clone().map(regex_replace); self.scope = parser.scope.clone().map(regex_replace); - self.default_scope = parser.default_scope.clone(); + self.default_scope.clone_from(&parser.default_scope); return Ok(self); } } diff --git a/git-cliff/src/lib.rs b/git-cliff/src/lib.rs index 3836c74..76501f7 100644 --- a/git-cliff/src/lib.rs +++ b/git-cliff/src/lib.rs @@ -268,7 +268,7 @@ fn process_repository<'a>( release.repository = Some(repository.path.to_string_lossy().into_owned()); if let Some(tag) = tags.get(&commit_id) { release.version = Some(tag.name.to_string()); - release.message = tag.message.clone(); + release.message.clone_from(&tag.message); release.commit_id = Some(commit_id); release.timestamp = if args.tag.as_deref() == Some(tag.name.as_str()) { match tag_timestamp {