diff options
Diffstat (limited to 'crates/shirabe/src/package/version')
| -rw-r--r-- | crates/shirabe/src/package/version/version_guesser.rs | 7 | ||||
| -rw-r--r-- | crates/shirabe/src/package/version/version_selector.rs | 11 |
2 files changed, 7 insertions, 11 deletions
diff --git a/crates/shirabe/src/package/version/version_guesser.rs b/crates/shirabe/src/package/version/version_guesser.rs index 98853952..1968ff11 100644 --- a/crates/shirabe/src/package/version/version_guesser.rs +++ b/crates/shirabe/src/package/version/version_guesser.rs @@ -750,10 +750,9 @@ impl VersionGuesser { let version = match version { Some(v) if !v.is_empty() => v, _ => { - return Err(RuntimeException { - message: "COMPOSER_ROOT_VERSION not set or empty".to_string(), - code: 0, - } + return Err(RuntimeException::new( + "COMPOSER_ROOT_VERSION not set or empty".to_string(), + ) .into()); } }; diff --git a/crates/shirabe/src/package/version/version_selector.rs b/crates/shirabe/src/package/version/version_selector.rs index 84f2beef..733f342d 100644 --- a/crates/shirabe/src/package/version/version_selector.rs +++ b/crates/shirabe/src/package/version/version_selector.rs @@ -76,13 +76,10 @@ impl VersionSelector { show_warnings: ShowWarnings, ) -> anyhow::Result<Option<crate::package::PackageInterfaceHandle>> { if !base_package::STABILITIES.contains_key(preferred_stability) { - return Err(shirabe_php_shim::UnexpectedValueException { - message: format!( - "Expected a valid stability name as 3rd argument, got {}", - preferred_stability - ), - code: 0, - } + return Err(shirabe_php_shim::UnexpectedValueException::new(format!( + "Expected a valid stability name as 3rd argument, got {}", + preferred_stability + )) .into()); } |
