summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
committerfxqnlr <[email protected]>2023-04-23 21:47:37 +0200
commit3e65975227baa511f570e8223fccda5607cf905e (patch)
treef852fd5cc3b26a004cf7bfab054e86c0d74c4669 /src/lib.rs
parent416f4dc383ff5a1194da3a5532a8e159a4a1dac0 (diff)
downloadmodlist-3e65975227baa511f570e8223fccda5607cf905e.tar
modlist-3e65975227baa511f570e8223fccda5607cf905e.tar.gz
modlist-3e65975227baa511f570e8223fccda5607cf905e.zip
added config argument, remove devdir
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}