Use inline format arguments
This commit is contained in:
parent
c4684a526f
commit
6b2b9d1a7f
|
@ -22,7 +22,7 @@ pub(crate) const SUCCESS_MSG: &str = "Command completed successfully";
|
|||
pub(crate) fn get_xml(path: &str) -> Result<String, Box<dyn Error>> {
|
||||
let ws_regex = Regex::new(r"[\s]{2,}")?;
|
||||
|
||||
let mut f = File::open(format!("{}/{}", RESOURCES_DIR, path))?;
|
||||
let mut f = File::open(format!("{RESOURCES_DIR}/{path}"))?;
|
||||
let mut buf = String::new();
|
||||
|
||||
f.read_to_string(&mut buf)?;
|
||||
|
|
|
@ -47,7 +47,7 @@ fn xml(path: &str) -> String {
|
|||
let ws_regex = Regex::new(r"[\s]{2,}").unwrap();
|
||||
let end_regex = Regex::new(r"\?>").unwrap();
|
||||
|
||||
let mut f = File::open(format!("tests/resources/{}", path)).unwrap();
|
||||
let mut f = File::open(format!("tests/resources/{path}")).unwrap();
|
||||
let mut buf = String::new();
|
||||
f.read_to_string(&mut buf).unwrap();
|
||||
|
||||
|
|
Loading…
Reference in New Issue