Skip to content

Commit

Permalink
refactor - removed dir argument
Browse files Browse the repository at this point in the history
  • Loading branch information
rufevean committed Sep 1, 2024
1 parent d3f72b5 commit ee886eb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ impl Config {
file.read_to_string(&mut toml)?;
Config::from_toml_for_style_edition(
&toml,
file_path.parent().unwrap(),

file_path,
edition,
style_edition,
Expand Down Expand Up @@ -371,13 +371,13 @@ impl Config {
}

#[allow(dead_code)]
pub(super) fn from_toml(toml: &str, dir: &Path,file_path : &Path) -> Result<Config, String> {
Self::from_toml_for_style_edition(toml, dir,file_path, None, None, None)
pub(super) fn from_toml(toml: &str,file_path : &Path) -> Result<Config, String> {
Self::from_toml_for_style_edition(toml,file_path, None, None, None)
}

pub(crate) fn from_toml_for_style_edition(
toml: &str,
dir: &Path,

file_path: &Path,
edition: Option<Edition>,
style_edition: Option<StyleEdition>,
Expand All @@ -402,7 +402,7 @@ impl Config {
if !err.is_empty() {
eprint!("{err}");
}
Ok(parsed_config.to_parsed_config(style_edition, edition, version, dir))
Ok(parsed_config.to_parsed_config(style_edition, edition, version, file_path.parent().unwrap()))
}
Err(e) => {

Expand Down

0 comments on commit ee886eb

Please sign in to comment.