Restructure for testability and implement first tests
This commit is contained in:
@ -1,6 +1,3 @@
|
||||
use crate::{config::Settings, count::count_repositories};
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
|
||||
pub struct VersionInfo<'a> {
|
||||
pub commit: &'a str,
|
||||
pub version: &'a str,
|
||||
@ -15,7 +12,4 @@ 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: Settings = Settings::new().unwrap();
|
||||
pub(crate) static ref REPO_COUNT: AtomicUsize =
|
||||
AtomicUsize::new(count_repositories(&OPT.repodir).unwrap());
|
||||
}
|
||||
|
Reference in New Issue
Block a user