From fdf80dd11f6369010c85541ec446977fa564fcb3 Mon Sep 17 00:00:00 2001 From: Petr Gadorek Date: Thu, 5 Dec 2024 10:09:32 +0100 Subject: [PATCH] renamed the config from esp_idf.json to eim_idf.json --- src/idf_config.rs | 4 ++-- src/settings.rs | 2 +- src/version_manager.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/idf_config.rs b/src/idf_config.rs index 25d4d31..84033a2 100644 --- a/src/idf_config.rs +++ b/src/idf_config.rs @@ -44,7 +44,7 @@ impl IdfConfig { /// /// ```rust /// let config = IdfConfig { ... }; - /// config.to_file("esp_ide.json", true)?; + /// config.to_file("eim_idf.json", true)?; /// ``` pub fn to_file>(&mut self, path: P, pretty: bool) -> Result<()> { // Create parent directories if they don't exist @@ -70,7 +70,7 @@ impl IdfConfig { .open(path)?; file.write_all(json_string.as_bytes()) - .with_context(|| anyhow!("writing to file esp_ide.json failed")) + .with_context(|| anyhow!("writing to file eim_idf.json failed")) } /// Reads and parses an IDF configuration from a file. diff --git a/src/settings.rs b/src/settings.rs index f3d4849..2710927 100644 --- a/src/settings.rs +++ b/src/settings.rs @@ -225,7 +225,7 @@ impl Settings { let tmp_path = PathBuf::from(self.esp_idf_json_path.clone().unwrap_or_default()); - let ide_conf_path = tmp_path.join("esp_ide.json"); + let ide_conf_path = tmp_path.join("eim_idf.json"); config.to_file(ide_conf_path, true) } } diff --git a/src/version_manager.rs b/src/version_manager.rs index 51c32a1..60ce8a3 100644 --- a/src/version_manager.rs +++ b/src/version_manager.rs @@ -15,7 +15,7 @@ use crate::{ /// Returns the default path to the ESP-IDF configuration file. /// /// The default path is constructed by joining the `esp_idf_json_path` setting from the `Settings` struct -/// with the filename "esp_ide.json". If `esp_idf_json_path` is not set, the default path will be +/// with the filename "eim_idf.json". If `esp_idf_json_path` is not set, the default path will be /// constructed using the default settings. /// /// # Returns @@ -23,7 +23,7 @@ use crate::{ /// A `PathBuf` representing the default path to the ESP-IDF configuration file. fn get_default_config_path() -> PathBuf { let default_settings = Settings::default(); - PathBuf::from(default_settings.esp_idf_json_path.unwrap_or_default()).join("esp_ide.json") + PathBuf::from(default_settings.esp_idf_json_path.unwrap_or_default()).join("eim_idf.json") } // todo: add optional path parameter enabling the user to specify a custom config file