Use new config

This commit is contained in:
Valentin Brandl
2020-11-24 19:06:49 +01:00
parent 8e78d13443
commit 9e33742d81
4 changed files with 34 additions and 35 deletions

View File

@ -1,6 +1,5 @@
use crate::{config::Opt, count::count_repositories};
use crate::{config::Settings, count::count_repositories};
use std::sync::atomic::AtomicUsize;
use structopt::StructOpt;
pub struct VersionInfo<'a> {
pub commit: &'a str,
@ -16,7 +15,7 @@ pub(crate) const FAVICON: &[u8] = include_bytes!("../static/favicon32.png");
lazy_static! {
pub(crate) static ref CLIENT: reqwest::Client = reqwest::Client::new();
pub(crate) static ref OPT: Opt = Opt::from_args();
pub(crate) static ref OPT: Settings = Settings::new().unwrap();
pub(crate) static ref REPO_COUNT: AtomicUsize =
AtomicUsize::new(count_repositories(&OPT.outdir).unwrap());
AtomicUsize::new(count_repositories(&OPT.repodir).unwrap());
}