diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 17 |
1 files changed, 2 insertions, 15 deletions
@@ -1,11 +1,12 @@ | |||
1 | pub mod apis; | 1 | pub mod apis; |
2 | pub mod cache; | ||
2 | pub mod commands; | 3 | pub mod commands; |
3 | pub mod config; | 4 | pub mod config; |
4 | pub mod db; | 5 | pub mod db; |
5 | pub mod error; | 6 | pub mod error; |
6 | pub mod files; | 7 | pub mod files; |
7 | 8 | ||
8 | use std::{fmt::Display, path::Path}; | 9 | use std::fmt::Display; |
9 | 10 | ||
10 | pub use apis::*; | 11 | pub use apis::*; |
11 | pub use commands::*; | 12 | pub use commands::*; |
@@ -35,17 +36,3 @@ impl Display for Modloader { | |||
35 | } | 36 | } |
36 | } | 37 | } |
37 | } | 38 | } |
38 | |||
39 | pub fn devdir(path: &str) -> String { | ||
40 | let p = Path::new(path); | ||
41 | let dev = std::env::var("DEV"); | ||
42 | let lvl = match dev { | ||
43 | Ok(dev) => dev.parse::<i32>().unwrap(), | ||
44 | Err(..) => 0, | ||
45 | }; | ||
46 | if lvl >= 1 { | ||
47 | format!("./dev/{}", p.file_name().unwrap().to_str().unwrap()) | ||
48 | } else { | ||
49 | String::from(path) | ||
50 | } | ||
51 | } | ||