mirror of https://github.com/rwf2/Rocket.git
Revert rustfmt changes to TemplateInfo block
This commit is contained in:
parent
7d35841502
commit
19ed10f2b8
|
@ -218,14 +218,10 @@ fn discover_templates() -> HashMap<String, TemplateInfo> {
|
||||||
glob_path.set_extension(ext);
|
glob_path.set_extension(ext);
|
||||||
for path in glob(glob_path.to_str().unwrap()).unwrap().filter_map(Result::ok) {
|
for path in glob(glob_path.to_str().unwrap()).unwrap().filter_map(Result::ok) {
|
||||||
let (rel_path, name, data_type) = split_path(&path);
|
let (rel_path, name, data_type) = split_path(&path);
|
||||||
templates.insert(name,
|
templates.insert(name, TemplateInfo {
|
||||||
TemplateInfo {
|
|
||||||
full_path: path.to_path_buf(),
|
full_path: path.to_path_buf(),
|
||||||
path: rel_path,
|
path: rel_path,
|
||||||
extension: path.extension()
|
extension: path.extension().unwrap().to_string_lossy().into_owned(),
|
||||||
.unwrap()
|
|
||||||
.to_string_lossy()
|
|
||||||
.into_owned(),
|
|
||||||
data_type: data_type,
|
data_type: data_type,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue