summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 43f0fe7..185edd7 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,11 +1,12 @@
1pub mod apis; 1pub mod apis;
2pub mod cache;
2pub mod commands; 3pub mod commands;
3pub mod config; 4pub mod config;
4pub mod db; 5pub mod db;
5pub mod error; 6pub mod error;
6pub mod files; 7pub mod files;
7 8
8use std::{fmt::Display, path::Path}; 9use std::fmt::Display;
9 10
10pub use apis::*; 11pub use apis::*;
11pub use commands::*; 12pub use commands::*;
@@ -35,17 +36,3 @@ impl Display for Modloader {
35 } 36 }
36 } 37 }
37} 38}
38
39pub 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}