mirror of
https://github.com/servo/servo.git
synced 2025-08-18 03:45:33 +01:00
Stop abusing format! macro when construct a String
In these cases for `format!`, we're just constructing a String of the single argument with no special format.
This commit is contained in:
parent
445f1c891a
commit
5a780cb221
5 changed files with 7 additions and 7 deletions
|
@ -45,7 +45,7 @@ fn parse_config(args: Vec<String>) -> Config {
|
|||
let opts = vec!(reqopt("s", "source-dir", "source-dir", "source-dir"));
|
||||
let matches = match getopts(args, opts.as_slice()) {
|
||||
Ok(m) => m,
|
||||
Err(f) => panic!(format!("{}", f))
|
||||
Err(f) => panic!(f.to_string())
|
||||
};
|
||||
|
||||
Config {
|
||||
|
@ -73,7 +73,7 @@ fn find_tests(config: Config) -> Vec<TestDescAndFn> {
|
|||
_ => panic!("Error reading directory."),
|
||||
};
|
||||
files.retain(|file| file.extension_str() == Some("html") );
|
||||
return files.iter().map(|file| make_test(format!("{}", file.display()))).collect();
|
||||
return files.iter().map(|file| make_test(file.display().to_string())).collect();
|
||||
}
|
||||
|
||||
fn make_test(file: String) -> TestDescAndFn {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue