We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d291c74 commit 5b44208Copy full SHA for 5b44208
src/utils/config.rs
@@ -280,7 +280,8 @@ pub fn get_config_file_path() -> Result<PathBuf> {
280
path.push(".config/envx/config.json");
281
// if it doesn't exist, create it
282
if !path.exists() {
283
- let default = serde_json::to_string_pretty(&Config::default())?;
+ let tmp = std::mem::ManuallyDrop::new(Config::default());
284
+ let default = serde_json::to_string_pretty(&*tmp)?;
285
let parent_path =
286
path.parent().context("Failed to get parent directory")?;
287
fs::create_dir_all(parent_path)?;
0 commit comments