Skip to content

Commit c42e7b9

Browse files
committed
add anonymous lifetimes, remove unnecessary extern crate declaration
1 parent cd08962 commit c42e7b9

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

src/git.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct Commit {
2626

2727
impl Commit {
2828
// Takes &mut because libgit2 internally caches summaries
29-
fn from_git2_commit(commit: &mut Git2Commit) -> Self {
29+
fn from_git2_commit(commit: &mut Git2Commit<'_>) -> Self {
3030
Commit {
3131
sha: commit.id().to_string(),
3232
date: Utc.timestamp(commit.time().seconds(), 0),
@@ -83,7 +83,7 @@ pub fn get_commits_between(first_commit: &str, last_commit: &str) -> Result<Vec<
8383

8484
// Sanity check -- our algorithm below only works reliably if the
8585
// two commits are merge commits made by bors
86-
let assert_by_bors = |c: &Git2Commit| -> Result<(), Error> {
86+
let assert_by_bors = |c: &Git2Commit<'_>| -> Result<(), Error> {
8787
match c.author().name() {
8888
Some("bors") => Ok(()),
8989
Some(author) => bail!("Expected author {} to be bors for {}", author, c.id()),

src/least_satisfying.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pub enum Satisfies {
174174
}
175175

176176
impl fmt::Display for Satisfies {
177-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
177+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
178178
write!(f, "{:?}", self)
179179
}
180180
}

src/main.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
extern crate failure;
1010
#[macro_use]
1111
extern crate log;
12-
#[cfg(test)]
13-
extern crate quickcheck;
12+
1413

1514
use std::env;
1615
use std::ffi::OsString;
@@ -219,7 +218,7 @@ impl Opts {
219218
struct ExitError(i32);
220219

221220
impl fmt::Display for ExitError {
222-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
221+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
223222
write!(f, "exiting with {}", self.0)
224223
}
225224
}
@@ -238,7 +237,7 @@ enum ToolchainSpec {
238237
}
239238

240239
impl fmt::Display for ToolchainSpec {
241-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
240+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
242241
match *self {
243242
ToolchainSpec::Ci { ref commit, alt } => {
244243
let alt_s = if alt { format!("-alt") } else { String::new() };
@@ -266,7 +265,7 @@ impl Toolchain {
266265
}
267266

268267
impl fmt::Display for Toolchain {
269-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
268+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
270269
match self.spec {
271270
ToolchainSpec::Ci { ref commit, alt } => {
272271
let alt_s = if alt { format!("-alt") } else { String::new() };

0 commit comments

Comments
 (0)