From 9aeb5815a73b67131bdef832c6f48a77603480f2 Mon Sep 17 00:00:00 2001 From: Grant Wuerker Date: Thu, 13 Feb 2025 11:48:16 -0700 Subject: [PATCH] config.toml > fe.toml --- crates/resolver/src/ingot/config.rs | 6 ++++-- library/core/{config.toml => fe.toml} | 0 2 files changed, 4 insertions(+), 2 deletions(-) rename library/core/{config.toml => fe.toml} (100%) diff --git a/crates/resolver/src/ingot/config.rs b/crates/resolver/src/ingot/config.rs index 5d5d0655e..74912af54 100644 --- a/crates/resolver/src/ingot/config.rs +++ b/crates/resolver/src/ingot/config.rs @@ -7,6 +7,8 @@ use toml::{self, Table}; use crate::Resolver; +const FE_CONFIG_SUFFIX: &str = "fe.toml"; + #[derive(Default, Debug, Clone)] pub struct Config { pub name: Option, @@ -40,7 +42,7 @@ impl Resolver for ConfigResolver { type Diagnostic = Diagnostic; fn resolve(&mut self, ingot_path: &Utf8PathBuf) -> Result { - let config_path = ingot_path.join("config.toml"); + let config_path = ingot_path.join(FE_CONFIG_SUFFIX); if config_path.exists() { let file_content = fs::read_to_string(&config_path).map_err(Error::FileReadError)?; @@ -110,7 +112,7 @@ impl fmt::Display for Error { match self { Self::ConfigFileDoesNotExist => write!( f, - "a `config.toml` file does not exist in the ingot directory" + "a `{FE_CONFIG_SUFFIX}` file does not exist in the ingot directory" ), Self::FileReadError(error) => write!(f, "file read error: {error}"), Self::TomlParseError(error) => write!(f, "toml parse error: {error}"), diff --git a/library/core/config.toml b/library/core/fe.toml similarity index 100% rename from library/core/config.toml rename to library/core/fe.toml