[fractal] Fix deserialization of enum Medium
- From: Daniel Garcia Moreno <danigm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal] Fix deserialization of enum Medium
- Date: Fri, 18 Oct 2019 09:05:06 +0000 (UTC)
commit aff0d6bcbe1dde9c6f387e6b8de7a76594e0a5b5
Author: sonjita <sonjaleaheinze gmail com>
Date: Thu Oct 17 11:31:27 2019 +0200
Fix deserialization of enum Medium
Before, "Medium" was renamed to "lowercase".
With this commit, "Email" and "MsIsdn" are renamed to "email" and "msisdn", respectively.
This commit fixes the bug due to which account settings wouldn't load.
fractal-gtk/src/actions/global.rs | 6 +++---
fractal-matrix-api/src/r0.rs | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/fractal-gtk/src/actions/global.rs b/fractal-gtk/src/actions/global.rs
index 4e9e28fa..0c6a6eeb 100644
--- a/fractal-gtk/src/actions/global.rs
+++ b/fractal-gtk/src/actions/global.rs
@@ -347,13 +347,13 @@ fn open_viewer(data: Option<&glib::Variant>) -> Option<()> {
pub fn activate_action(action_group_name: &str, action_name: &str) {
if let Some(op) = App::get_op() {
- let mutexguard = op.lock().unwrap();
- let main_window = mutexguard
+ let main_window = op
+ .lock()
+ .unwrap()
.ui
.builder
.get_object::<gtk::Window>("main_window")
.expect("Can't find main_window in ui file.");
- std::mem::drop(mutexguard);
if let Some(action_group) = main_window.get_action_group(action_group_name) {
action_group.activate_action(action_name, None);
}
diff --git a/fractal-matrix-api/src/r0.rs b/fractal-matrix-api/src/r0.rs
index 86c74a3a..9b1f1bf2 100644
--- a/fractal-matrix-api/src/r0.rs
+++ b/fractal-matrix-api/src/r0.rs
@@ -12,7 +12,7 @@ pub mod thirdparty;
use serde::{Deserialize, Serialize};
#[derive(Clone, Debug, Deserialize, Serialize)]
-#[serde(rename = "lowercase")]
+#[serde(rename_all = "lowercase")]
pub enum Medium {
Email,
MsIsdn,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]