Skip to content

Commit 26a3818

Browse files
authored
Fix all mismatched_lifetime_syntaxes warnings (#2727)
1 parent 5f23781 commit 26a3818

File tree

26 files changed

+34
-26
lines changed

26 files changed

+34
-26
lines changed

asyncgit/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ It wraps libraries like git2 and gix.
1010

1111
#![forbid(missing_docs)]
1212
#![deny(
13+
mismatched_lifetime_syntaxes,
1314
unused_imports,
1415
unused_must_use,
1516
dead_code,

asyncgit/src/sync/remotes/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ pub fn get_default_remote(repo_path: &RepoPath) -> Result<String> {
120120
/// and Err if there was a problem finding the branch
121121
fn get_current_branch(
122122
repo: &Repository,
123-
) -> Result<Option<git2::Branch>> {
123+
) -> Result<Option<git2::Branch<'_>>> {
124124
for b in repo.branches(None)? {
125125
let branch = b?.0;
126126
if branch.is_head() {

asyncgit/src/sync/reword.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ pub fn reword(
6262
/// and Err if there was a problem finding the branch
6363
fn get_current_branch(
6464
repo: &Repository,
65-
) -> Result<Option<git2::Branch>> {
65+
) -> Result<Option<git2::Branch<'_>>> {
6666
for b in repo.branches(None)? {
6767
let branch = b?.0;
6868
if branch.is_head() {

filetreelist/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// #![forbid(missing_docs)]
22
#![forbid(unsafe_code)]
33
#![deny(
4+
mismatched_lifetime_syntaxes,
45
unused_imports,
56
unused_must_use,
67
dead_code,

git2-hooks/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
1212
#![forbid(unsafe_code)]
1313
#![deny(
14+
mismatched_lifetime_syntaxes,
1415
unused_imports,
1516
unused_must_use,
1617
dead_code,

git2-testing/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(mismatched_lifetime_syntaxes)]
2+
13
use git2::Repository;
24
use tempfile::TempDir;
35

invalidstring/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(mismatched_lifetime_syntaxes)]
2+
13
/// uses unsafe to postfix the string with invalid utf8 data
24
#[allow(invalid_from_utf8_unchecked)]
35
pub fn invalid_utf8(prefix: &str) -> String {

scopetime/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! simple macro to insert a scope based runtime measure that logs the result
22
33
#![forbid(unsafe_code)]
4-
#![deny(unused_imports)]
4+
#![deny(mismatched_lifetime_syntaxes, unused_imports)]
55
#![deny(clippy::unwrap_used)]
66
#![deny(clippy::perf)]
77

src/components/commit_details/compare_details.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl CompareDetailsComponent {
5858
});
5959
}
6060

61-
fn get_commit_text(&self, data: &CommitDetails) -> Vec<Line> {
61+
fn get_commit_text(&self, data: &CommitDetails) -> Vec<Line<'_>> {
6262
let mut res = vec![
6363
Line::from(vec![
6464
style_detail(&self.theme, &Detail::Author),

src/components/commit_details/details.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ impl DetailsComponent {
136136
&self,
137137
width: usize,
138138
height: usize,
139-
) -> Vec<Line> {
139+
) -> Vec<Line<'_>> {
140140
let (wrapped_title, wrapped_message) =
141141
Self::get_wrapped_lines(self.data.as_ref(), width);
142142

@@ -156,7 +156,7 @@ impl DetailsComponent {
156156
}
157157

158158
#[allow(clippy::too_many_lines)]
159-
fn get_text_info(&self) -> Vec<Line> {
159+
fn get_text_info(&self) -> Vec<Line<'_>> {
160160
self.data.as_ref().map_or_else(Vec::new, |data| {
161161
let mut res = vec![
162162
Line::from(vec![

0 commit comments

Comments
 (0)