mirror of
https://github.com/Noratrieb/game-wip-dontplay.git
synced 2026-01-16 20:35:02 +01:00
Evaluate side effects outside of log macro
Otherwise, they will not be evaluated if the logger isn't init correctly
This commit is contained in:
parent
5b86b40e47
commit
0b491a91c5
3 changed files with 18 additions and 24 deletions
|
|
@ -53,9 +53,7 @@ impl Player {
|
|||
}
|
||||
|
||||
pub(crate) fn save(&self) {
|
||||
log::info!(
|
||||
"{:?}",
|
||||
std::fs::write("player.dat", rmp_serde::to_vec(self).unwrap())
|
||||
);
|
||||
let result = std::fs::write("player.dat", rmp_serde::to_vec(self).unwrap());
|
||||
log::info!("{result:?}");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue