Skip to content

Commit

Permalink
Match against what directory to look from, neat
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Oct 18, 2018
1 parent e1ab587 commit 8be2eca
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,10 @@ impl Author {

fn main() -> Result<(), Box<Error>> {
let start = Instant::now();
let opt = Cli::from_args();
let curses: HashSet<&str> = CURSES.lines().collect();
let path = if opt.directory.is_none() {
env::current_dir()?
} else {
opt.directory.unwrap()
let path = match Cli::from_args().directory {
Some(directory) => directory,
None => env::current_dir()?,
};
let repo = Repository::open(&path)?;
let mut revwalk = repo.revwalk()?;
Expand Down

0 comments on commit 8be2eca

Please sign in to comment.