1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-28 15:56:28 +00:00

style: Fix clippy warnings

This commit is contained in:
Matan Kushner 2019-08-23 13:11:20 -04:00
parent 2d10cb2b30
commit 57e807fec6
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4

View File

@ -60,11 +60,11 @@ fn extract_poetry_version(file_contents: &str) -> Option<String> {
fn get_package_version() -> Option<String> { fn get_package_version() -> Option<String> {
if let Ok(cargo_toml) = utils::read_file("Cargo.toml") { if let Ok(cargo_toml) = utils::read_file("Cargo.toml") {
return extract_cargo_version(&cargo_toml); extract_cargo_version(&cargo_toml)
} else if let Ok(package_json) = utils::read_file("package.json") { } else if let Ok(package_json) = utils::read_file("package.json") {
return extract_package_version(&package_json); extract_package_version(&package_json)
} else if let Ok(poetry_toml) = utils::read_file("pyproject.toml") { } else if let Ok(poetry_toml) = utils::read_file("pyproject.toml") {
return extract_poetry_version(&poetry_toml); extract_poetry_version(&poetry_toml)
} else { } else {
None None
} }