Use CARGO_PKG_NAME

This commit is contained in:
FliegendeWurst 2020-05-08 22:03:45 +02:00
parent d6f635b442
commit 474ad43fc8

View File

@ -315,7 +315,7 @@ impl ILIAS {
let pass = pass.into(); let pass = pass.into();
let client = Client::builder() let client = Client::builder()
.cookie_store(true) .cookie_store(true)
.user_agent(concat!("KIT-ILIAS-downloader/", env!("CARGO_PKG_VERSION"))) .user_agent(concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")))
// timeout is infinite by default // timeout is infinite by default
.build()?; .build()?;
// load .iliasignore file // load .iliasignore file
@ -877,7 +877,7 @@ fn process(ilias: Arc<ILIAS>, path: PathBuf, obj: Object) -> impl std::future::F
}} }}
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
#[structopt(name = "KIT-ILIAS-downloader")] #[structopt(name = env!("CARGO_PKG_NAME"))]
struct Opt { struct Opt {
/// Do not download files /// Do not download files
#[structopt(short, long)] #[structopt(short, long)]