From a44f8304fe724bb4e3e88a2d69c5c913ad46a73f Mon Sep 17 00:00:00 2001 From: nicolaiunrein Date: Mon, 9 Dec 2024 19:13:35 +0100 Subject: [PATCH] Update main.rs --- src/main.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 753328c..e392643 100644 --- a/src/main.rs +++ b/src/main.rs @@ -60,7 +60,7 @@ pub fn output(cli: cli::Cli) -> Result> { } 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() @@ -155,11 +155,7 @@ pub fn output(cli: cli::Cli) -> Result> { 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(),