Skip to content

Commit

Permalink
fix: swap merge order
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Nov 11, 2024
1 parent 5781841 commit 2e5ae9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src-tauri/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl Config {

match serde_json::from_str::<Config>(config_str) {
Ok(config) => {
let config = config.merge(Self::default());
let config = Self::default().merge(config);
Ok(config)
},
Err(e) => {
Expand Down Expand Up @@ -174,7 +174,7 @@ impl Config {
pub fn from_str(contents: impl AsRef<str>) -> Result<Self, Box<dyn std::error::Error>> {
match serde_json::from_str::<Config>(contents.as_ref()) {
Ok(config) => {
let config = config.merge(Self::default());
let config = Self::default().merge(config);
Ok(config)
},
Err(e) => {
Expand Down

0 comments on commit 2e5ae9e

Please sign in to comment.