Refactoring

This commit is contained in:
Philip Kristoffersen
2022-04-04 21:57:30 +02:00
parent 1c376c2f31
commit 3b8aaffc31
6 changed files with 76 additions and 97 deletions
+4 -4
View File
@@ -42,9 +42,9 @@ fn enable_proton_games<S: AsRef<str>, B: AsRef<str>>(vdf_content: S, games: &[B]
.map(|game_id| {
let res = proton_replace_string.to_string();
let res = res.replace("\"X\"", &format!("\"{}\"", game_id.as_ref()));
let res = res.replace("=", &base_indent_string);
let res = res.replace("+", &field_indent_string);
res
let res = res.replace('=', &base_indent_string);
res.replace('+', &field_indent_string)
});
let mut new_section = section_str.to_string();
for game_string in games_strings_to_add {
@@ -59,7 +59,7 @@ fn enable_proton_games<S: AsRef<str>, B: AsRef<str>>(vdf_content: S, games: &[B]
//TODO make this an error instead?
println!("Could not find proton section in steam, try to manually set proton on at least one game and then rerun");
}
return vdf_content.to_string();
vdf_content.to_string()
}
struct SectionInfo {