Skip to content

Commit

Permalink
config.toml > fe.toml (#1058)
Browse files Browse the repository at this point in the history
Co-authored-by: Grant  Wuerker <grantwuerker@pop-os.localdomain>
  • Loading branch information
g-r-a-n-t and Grant Wuerker authored Feb 14, 2025
1 parent c04dec4 commit 0bb0c07
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/resolver/src/ingot/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<SmolStr>,
Expand Down Expand Up @@ -40,7 +42,7 @@ impl Resolver for ConfigResolver {
type Diagnostic = Diagnostic;

fn resolve(&mut self, ingot_path: &Utf8PathBuf) -> Result<Config, Error> {
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)?;
Expand Down Expand Up @@ -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}"),
Expand Down
File renamed without changes.

0 comments on commit 0bb0c07

Please sign in to comment.