mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Remove redundant cfg flags
This commit is contained in:
@@ -39,7 +39,6 @@ pub async fn run_ui() -> Result<(), Box<dyn Error>> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ui")]
|
|
||||||
fn empty_or_whitespace(input: String) -> Option<String> {
|
fn empty_or_whitespace(input: String) -> Option<String> {
|
||||||
if input.trim().is_empty() {
|
if input.trim().is_empty() {
|
||||||
None
|
None
|
||||||
@@ -47,7 +46,6 @@ fn empty_or_whitespace(input: String) -> Option<String> {
|
|||||||
Some(input)
|
Some(input)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(feature = "ui")]
|
|
||||||
fn update_settings_with_ui_values(settings: &mut Settings, ui: &UserInterface) {
|
fn update_settings_with_ui_values(settings: &mut Settings, ui: &UserInterface) {
|
||||||
// Steam location
|
// Steam location
|
||||||
settings.steam.location = empty_or_whitespace(ui.steam_location_input.value());
|
settings.steam.location = empty_or_whitespace(ui.steam_location_input.value());
|
||||||
@@ -78,14 +76,12 @@ fn update_settings_with_ui_values(settings: &mut Settings, ui: &UserInterface) {
|
|||||||
settings.gog.wine_c_drive = empty_or_whitespace(ui.gog_winedrive_input.value());
|
settings.gog.wine_c_drive = empty_or_whitespace(ui.gog_winedrive_input.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ui")]
|
|
||||||
|
|
||||||
fn save_settings_to_file(settings: &Settings) {
|
fn save_settings_to_file(settings: &Settings) {
|
||||||
let toml = toml::to_string(&settings).unwrap();
|
let toml = toml::to_string(&settings).unwrap();
|
||||||
std::fs::write("config.toml", toml).unwrap();
|
std::fs::write("config.toml", toml).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "ui")]
|
|
||||||
fn update_ui_with_settings(ui: &mut UserInterface, settings: &Settings) {
|
fn update_ui_with_settings(ui: &mut UserInterface, settings: &Settings) {
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user