Skip to content

Commit

Permalink
feat: easier api
Browse files Browse the repository at this point in the history
Signed-off-by: Florian-Schoenherr <[email protected]>
  • Loading branch information
Florian-Schoenherr authored and psnszsn committed Sep 22, 2021
1 parent 1952eda commit c7dbeb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ impl fmt::Display for Repo {
}
}

pub fn degit(src: &str, dest: PathBuf) {
pub fn degit(src: &str, dest: &str) {
let repo = parse(src).unwrap();
match download(repo, dest) {
match download(repo, PathBuf::from(dest)) {
Err(x) => println!("{}", x),
_ => (),
}
Expand Down
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use clap::{crate_version, App, Arg};
use std::{path::PathBuf};

fn main() {
let matches = App::new("degit-rs")
Expand Down Expand Up @@ -49,9 +48,6 @@ https://bitbucket.org/user/repo
.get_matches();

let src = matches.value_of("src").unwrap();

let dest = PathBuf::from(matches
.value_of("dest").unwrap());

let dest = matches.value_of("dest").unwrap();
degit::degit(src, dest);
}

0 comments on commit c7dbeb7

Please sign in to comment.