diff options
| author | Joakim Hulthe <joakim@hulthe.net> | 2024-02-27 16:22:28 +0100 |
|---|---|---|
| committer | Joakim Hulthe <joakim@hulthe.net> | 2024-02-28 11:13:51 +0100 |
| commit | 6eb4640521fe930b0b91d7c88fab1e46716f84fb (patch) | |
| tree | c4f5d94517a5f186a12897d8fa61cacac64bbd7a | |
| parent | 1fd4c4ff4ee71a44b42ff5e475c0296f02ab641c (diff) | |
| download | mullvadvpn-6eb4640521fe930b0b91d7c88fab1e46716f84fb.tar.xz mullvadvpn-6eb4640521fe930b0b91d7c88fab1e46716f84fb.zip | |
Tweak migrations template fn versions_matches
Make it not take a mut ref to the json value
| -rw-r--r-- | mullvad-daemon/src/migrations/vX.rs.template | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mullvad-daemon/src/migrations/vX.rs.template b/mullvad-daemon/src/migrations/vX.rs.template index 349145db13..9959502122 100644 --- a/mullvad-daemon/src/migrations/vX.rs.template +++ b/mullvad-daemon/src/migrations/vX.rs.template @@ -26,7 +26,7 @@ pub fn migrate(settings: &mut serde_json::Value) -> Result<()> { Ok(()) } -fn version_matches(settings: &mut serde_json::Value) -> bool { +fn version_matches(settings: &serde_json::Value) -> bool { settings .get("settings_version") // TODO @@ -37,7 +37,6 @@ fn version_matches(settings: &mut serde_json::Value) -> bool { #[cfg(test)] mod test { use super::{migrate, version_matches}; - use serde_json; // TODO: Implement tests. Look at other migration modules for inspiration. } |
