Skip to content

Commit 31e464d

Browse files
committed
move base urls to constants
1 parent c4a9e88 commit 31e464d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/constants.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ pub const ORIGINAL_FONT: &'static [u8; 1568] = include_bytes!("../assets/origina
1212
pub const PATH_CACHE_FILE: &'static str = "./dfint-installer.cache";
1313
pub const PATH_ERROR_FILE: &'static str = "./dfint-error.log";
1414

15+
pub const BASE_URL: [&'static str; 2] = [
16+
"https://dfint.github.io",
17+
"https://gitverse.ru/api/repos/dfint/data-mirror/raw/branch/master",
18+
];
19+
1520
pub const URL_HOOK_MANIFEST: &'static str = "/update-data/metadata/hook_v3.json";
1621
pub const URL_DICT_MANIFEST: &'static str = "/update-data/metadata/dict_v3.json";
1722
pub const URL_BUGS: &'static str = "https://github.com/dfint/installer/issues";

src/fetch.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,7 @@ use std::{
44
sync::atomic::{AtomicUsize, Ordering},
55
};
66

7-
use crate::fetch;
8-
9-
pub const BASE_URL: [&'static str; 2] = [
10-
"https://dfint.github.io",
11-
"https://gitverse.ru/api/repos/dfint/data-mirror/raw/branch/master",
12-
];
7+
use crate::{constants::BASE_URL, fetch};
138

149
static BASE_URL_INDEX: AtomicUsize = AtomicUsize::new(0);
1510

0 commit comments

Comments
 (0)