From 3e65975227baa511f570e8223fccda5607cf905e Mon Sep 17 00:00:00 2001 From: fxqnlr Date: Sun, 23 Apr 2023 21:47:37 +0200 Subject: added config argument, remove devdir --- src/lib.rs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) (limited to 'src/lib.rs') 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; pub mod files; pub mod cache; -use std::{fmt::Display, path::Path}; +use std::fmt::Display; pub use apis::*; pub use commands::*; @@ -36,17 +36,3 @@ impl Display for Modloader { } } } - -pub fn devdir(path: &str) -> String { - let p = Path::new(path); - let dev = std::env::var("DEV"); - let lvl = match dev { - Ok(dev) => dev.parse::().unwrap(), - Err(..) => 0, - }; - if lvl >= 1 { - format!("./dev/{}", p.file_name().unwrap().to_str().unwrap()) - } else { - String::from(path) - } -} -- cgit v1.2.3