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