We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 633ef39 commit 98b46a1Copy full SHA for 98b46a1
mullvad-daemon/src/version_check.rs
@@ -403,11 +403,8 @@ impl UpdateContext {
403
async move {
404
log::debug!("Writing version check cache to {}", cache_path.display());
405
let cached_app_version = CachedAppVersionInfo::from(last_app_version.to_owned());
406
- let mut buf =
407
- serde_json::to_vec_pretty(&cached_app_version).map_err(Error::Serialize)?;
408
- let mut read_buf: &[u8] = buf.as_mut();
409
-
410
- tokio::fs::write(cache_path, &mut read_buf)
+ let buf = serde_json::to_vec_pretty(&cached_app_version).map_err(Error::Serialize)?;
+ tokio::fs::write(cache_path, buf)
411
.await
412
.map_err(Error::WriteVersionCache)
413
}
0 commit comments