made clippy happy. Hopefully didnt break anything as well

This commit is contained in:
2025-03-05 20:02:40 +01:00
parent 4d9e015d36
commit a23cd73b48
7 changed files with 53 additions and 62 deletions
+2 -2
View File
@@ -12,7 +12,7 @@ pub fn start(args: String) -> PyResult<()> {
rs_println!("Running Python program...");
let slash = if cfg!(windows) { "\\" } else if cfg!(unix) { "/" } else { "" };
if slash == "" { errln!("Man what kinda OS do you have? Neither unix or windows, what the hell!? I can't process this anymore, you're too weird!"); }
if slash.is_empty() { errln!("Man what kinda OS do you have? Neither unix or windows, what the hell!? I can't process this anymore, you're too weird!"); }
let path = format!("{0}{1}src{1}python", env!("CARGO_MANIFEST_DIR"), slash);
@@ -39,6 +39,6 @@ pub fn start(args: String) -> PyResult<()> {
fn get_code(path: &str) -> String {
return fs::read_to_string(path)
.expect(&format!("Failed to read Python file.\nPath: {}", path))
.unwrap_or_else(|_| panic!("Failed to read Python file.\nPath: {}", path))
.to_string();
}