Skip to content

Commit bd80984

Browse files
committed
refactor: clippy fixes
1 parent 41aeda5 commit bd80984

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/cmd/completion/man.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ impl<'a> Iterator for Paragraphs<'a> {
465465
}
466466
}
467467

468-
fn paragraphs(text: &str) -> Paragraphs {
468+
fn paragraphs(text: &str) -> Paragraphs<'_> {
469469
Paragraphs { text }
470470
}
471471

@@ -507,6 +507,6 @@ impl<'a> Iterator for WrappedLines<'a> {
507507
}
508508
}
509509

510-
fn wrap(text: &str, width: usize) -> WrappedLines {
510+
fn wrap(text: &str, width: usize) -> WrappedLines<'_> {
511511
WrappedLines { text, width }
512512
}

src/ext/commit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub(crate) trait CommitExtended<'a> {
2222
fn author_strict(&self) -> Result<gix::actor::Signature>;
2323

2424
/// Get commit message with extended capabilities.
25-
fn message_ex(&self) -> Message;
25+
fn message_ex(&self) -> Message<'_>;
2626

2727
/// Determine whether the commit has the same tree as its parent.
2828
fn is_no_change(&self) -> Result<bool>;
@@ -71,7 +71,7 @@ impl<'a> CommitExtended<'a> for gix::Commit<'a> {
7171
}
7272
}
7373

74-
fn message_ex(&self) -> Message {
74+
fn message_ex(&self) -> Message<'_> {
7575
let commit_ref = self.decode().expect("commit can be decoded");
7676
if let Ok(message) = commit_ref.message.to_str() {
7777
Message::Str(message)

src/stack/transaction/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ impl<'repo> StackTransaction<'repo> {
524524
commit: Rc::new(commit),
525525
}),
526526
);
527-
self.ui.print_popped(&[patchname.clone()])?;
527+
self.ui.print_popped(std::slice::from_ref(patchname))?;
528528
Ok(())
529529
}
530530

0 commit comments

Comments
 (0)