From 224d4d6d267673e36f6313d4d8d7104ec4784907 Mon Sep 17 00:00:00 2001 From: Alexander Chaplin Braz Date: Sun, 28 Nov 2021 16:37:40 +0100 Subject: [PATCH] eframe: don't prettify presisted ron strings (#902) What ultimately ends up stored into a file is the HashMap, which when prettified only nets three (depending on the settings) lines of "string": "long prettified string that's really hard to read because of the extra indentation and literal \n characters that are all just on one single line". Not prettifying the values in the first place makes it somewhat easier to read and also saves a bit of space. --- epi/src/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/epi/src/lib.rs b/epi/src/lib.rs index 7a3a6cd6..3cd5b7db 100644 --- a/epi/src/lib.rs +++ b/epi/src/lib.rs @@ -413,10 +413,7 @@ pub fn get_value(storage: &dyn Storage, key: &st /// Serialize the given value as [RON](https://github.com/ron-rs/ron) and store with the given key. #[cfg(feature = "ron")] pub fn set_value(storage: &mut dyn Storage, key: &str, value: &T) { - storage.set_string( - key, - ron::ser::to_string_pretty(value, Default::default()).unwrap(), - ); + storage.set_string(key, ron::ser::to_string(value).unwrap()); } /// [`Storage`] key used for app