Skip to content

Commit 0dfdba6

Browse files
committed
Rustfmt
1 parent ffe5fbb commit 0dfdba6

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/cargo/util/toml/mod.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1520,8 +1520,8 @@ fn readme_for_project(package_root: &Path, project: &Box<TomlProject>) -> Option
15201520
None => default_readme_from_package_root(package_root),
15211521
Some(value) => match value.as_str() {
15221522
"false" => None,
1523-
_ => Some(value.clone())
1524-
}
1523+
_ => Some(value.clone()),
1524+
},
15251525
}
15261526
}
15271527

@@ -1540,11 +1540,15 @@ fn _default_readme_from_package_root(package_root: &Path) -> CargoResult<String>
15401540
let fname = entry.file_name();
15411541

15421542
if entry.metadata()?.is_file() && DEFAULT_README_FILES.contains(&fname.to_str().unwrap()) {
1543-
return Ok(fname.into_string().map_err(|_| anyhow!("Could not convert the README's file name into a String"))?);
1543+
return Ok(fname
1544+
.into_string()
1545+
.map_err(|_| anyhow!("Could not convert the README's file name into a String"))?);
15441546
}
15451547
}
15461548

1547-
Err(anyhow!("No files with the default README file names found in the package root."))
1549+
Err(anyhow!(
1550+
"No files with the default README file names found in the package root."
1551+
))
15481552
}
15491553

15501554
/// Checks a list of build targets, and ensures the target names are unique within a vector.

0 commit comments

Comments
 (0)