Skip to content

Commit

Permalink
Update main.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaiunrein authored Dec 9, 2024
1 parent aabe240 commit a44f830
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ pub fn output(cli: cli::Cli) -> Result<String, Box<dyn Error>> {
}
cli::Command::PackageAuthors => package()?.authors().join(&delim_string),

cli::Command::PackageEdition => match package()?.edition().to_string(),
cli::Command::PackageEdition => package()?.edition().to_string(),
cli::Command::PackageName => package()?.name().to_string(),
cli::Command::PackageHomepage => package()?
.homepage()
Expand Down Expand Up @@ -155,11 +155,7 @@ pub fn output(cli: cli::Cli) -> Result<String, Box<dyn Error>> {

cli::Command::WorkspacePackageEdition => ws_package()?
.edition
.map(|e| match e {
cargo_toml::Edition::E2015 => "2015",
cargo_toml::Edition::E2018 => "2018",
cargo_toml::Edition::E2021 => "2021",
})
.map(|edition| edition.to_string())
.ok_or(NotSpecified("workspace.package.edition"))?
.to_string(),

Expand Down

0 comments on commit a44f830

Please sign in to comment.