Skip to content

Commit 8eaa3f6

Browse files
committed
fix: clippy suggestions
1 parent 0acbeb9 commit 8eaa3f6

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/commands/derive.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ fn create_variant_initial_commit(
1818

1919
let variant_head_oid = repo
2020
.commit(
21-
Some(&ref_name),
22-
&sig,
23-
&sig,
21+
Some(ref_name),
22+
sig,
23+
sig,
2424
"Variant initial commit\n",
2525
&tree,
2626
&[],
@@ -135,10 +135,10 @@ pub fn derive(repo: &Repository, name: &str, features: &[String]) -> Result<()>
135135
let commit = repo.find_commit(oid)?;
136136

137137
let summary = commit.summary().context("Error extracting summary")?;
138-
if let Some(feature) = extract_scope(summary) {
139-
if !target_features.contains(feature) {
140-
continue;
141-
}
138+
if let Some(feature) = extract_scope(summary)
139+
&& !target_features.contains(feature)
140+
{
141+
continue;
142142
}
143143

144144
if commit.parent_count() == 0 {
@@ -191,7 +191,7 @@ pub fn derive(repo: &Repository, name: &str, features: &[String]) -> Result<()>
191191
Some(&ref_name),
192192
&sig,
193193
&sig,
194-
&commit_msg,
194+
commit_msg,
195195
&new_tree,
196196
&[&variant_parent],
197197
)?;
@@ -204,7 +204,7 @@ pub fn derive(repo: &Repository, name: &str, features: &[String]) -> Result<()>
204204

205205
repo.reference_symbolic(
206206
&var_ref_name,
207-
&var_ref_target,
207+
var_ref_target,
208208
false,
209209
"initialized new variant",
210210
)

0 commit comments

Comments
 (0)