Skip to content

Commit cc2d95c

Browse files
committed
Fix unused/deprecated warnings
1 parent 36088b7 commit cc2d95c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

src/main.rs

+1-9
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ use std::{
1515
cmp,
1616
collections::HashMap,
1717
convert::From,
18-
env,
1918
ffi::OsStr,
2019
fmt,
2120
fmt::Write,
@@ -287,7 +286,7 @@ fn main() -> Result<()> {
287286

288287
let matches = App::new(crate_name!())
289288
.version(crate_version!())
290-
.author(crate_authors!("\n"))
289+
.author("o2sh <[email protected]>")
291290
.about(crate_description!())
292291
.arg(Arg::with_name("directory")
293292
.short("d")
@@ -494,7 +493,6 @@ fn get_configuration(dir: &str) -> Result<Configuration> {
494493

495494
// Return first n most active commiters as authors within this project.
496495
fn get_authors(dir: &str, n: usize) -> Vec<String> {
497-
use std::collections::HashMap;
498496
let output = Command::new("git")
499497
.arg("-C")
500498
.arg(dir)
@@ -672,10 +670,6 @@ enum Error {
672670
ReadDirectory,
673671
/// Not in a Git Repo
674672
NotGitRepo,
675-
/// Too few arguments
676-
TooFewArgs,
677-
/// Too many arguments
678-
TooManyArgs,
679673
}
680674

681675
impl fmt::Debug for Error {
@@ -686,8 +680,6 @@ impl fmt::Debug for Error {
686680
Error::NoGitData => "Could not retrieve git configuration data",
687681
Error::ReadDirectory => "Could not read directory",
688682
Error::NotGitRepo => "This is not a Git Repo",
689-
Error::TooFewArgs => "Too few arguments. Expected program name and a single argument.",
690-
Error::TooManyArgs => "Too many arguments. Expected a single argument.",
691683
};
692684
write!(f, "{}", content)
693685
}

0 commit comments

Comments
 (0)