From 4ed006c5489aa3ac5350d64307d7531819c58b62 Mon Sep 17 00:00:00 2001 From: yuni Date: Thu, 13 Jun 2024 00:04:24 +0200 Subject: [PATCH] fix console output in var::load_prefs (bevy macros dont work here) --- src/var.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/var.rs b/src/var.rs index 84ec5f0..492cd30 100644 --- a/src/var.rs +++ b/src/var.rs @@ -472,13 +472,13 @@ pub fn load_prefs() -> Preferences { match toml { Ok(toml) => (toml, Some(path)), Err(error) => { - error!("Failed to open preferences file '{path}': {error}"); + eprintln!("Error: Failed to open preferences file '{path}': {error}"); return Preferences::default(); } } } None => { - warn!("Found no preference file, using default preferences."); + println!("Found no preference file, using default preferences."); (include_str!("data/outfly.toml").to_string(), None) } }; @@ -486,21 +486,21 @@ pub fn load_prefs() -> Preferences { Ok(doc) => match toml_edit::de::from_document::(doc) { Ok(mut pref) => { if let Some(path) = &path { - info!("Loaded preference file from {path}"); + println!("Loaded preference file from {path}"); } else { - info!("Loaded preferences from internal defaults"); + println!("Loaded preferences from internal defaults"); } pref.source_file = path; dbg!(&pref); return pref; } Err(error) => { - error!("Failed to read preference line: {error}"); + eprintln!("Error: Failed to read preference line: {error}"); return Preferences::default(); } }, Err(error) => { - error!("Failed to open preferences: {error}"); + eprintln!("Error: Failed to open preferences: {error}"); return Preferences::default(); } }