1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 13:50:04 -04:00

Replace JSON with RON for persistence (epi/eframe/glium/web)

This commit is contained in:
Emil Ernerfeldt
2021-04-05 12:09:01 +02:00
parent 4fc3c6d375
commit aba2108159
9 changed files with 55 additions and 40 deletions

View File

@@ -10,10 +10,8 @@ pub struct WindowSettings {
impl WindowSettings {
#[cfg(feature = "persistence")]
pub fn from_json_file(
settings_json_path: impl AsRef<std::path::Path>,
) -> Option<WindowSettings> {
crate::persistence::read_json(settings_json_path)
pub fn from_ron_file(settings_ron_path: impl AsRef<std::path::Path>) -> Option<WindowSettings> {
crate::persistence::read_ron(settings_ron_path)
}
pub fn from_display(display: &glium::Display) -> Self {