Skip to content

Commit 3f14e62

Browse files
removed map_err
1 parent 40d1657 commit 3f14e62

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

config/src/config.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,7 @@ impl Config {
9090
}
9191

9292
fn substitute_env_vars(content: String) -> String {
93-
let re = Regex::new(r"\$\{([A-Z_][A-Z0-9_]*)\}")
94-
.map_err(|e| e.to_string())
95-
.expect("error substituting values");
96-
93+
let re = Regex::new(r"\$\{([A-Z_][A-Z0-9_]*)\}").expect("error substituting values");
9794
let result = re.replace_all(&content, |caps: &regex::Captures| {
9895
let var_name = &caps[1];
9996
// only substitues the value if the env variable is found else the same is kept

0 commit comments

Comments
 (0)