Skip to content

Commit

Permalink
Derive Default for graalvm::Edition
Browse files Browse the repository at this point in the history
  • Loading branch information
Akirathan committed Mar 11, 2024
1 parent 186c6e8 commit 47da811
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build/build/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ pub async fn deduce_graal(
build_sbt: &generated::RepoRootBuildSbt,
) -> Result<ide_ci::cache::goodie::graalvm::GraalVM> {
let build_sbt_content = ide_ci::fs::tokio::read_to_string(build_sbt).await?;
let graal_edition = env::GRAAL_EDITION.get().map_or(Edition::Community, |e| e);
let graal_edition = env::GRAAL_EDITION.get().map_or(Edition::default(), |e| e);

Ok(ide_ci::cache::goodie::graalvm::GraalVM {
client,
Expand Down
3 changes: 2 additions & 1 deletion build/ci_utils/src/cache/goodie/graalvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ crate::define_env_var! {
const CE_JAVA_VENDOR: &str = "GraalVM CE";
const EE_JAVA_VENDOR: &str = "Oracle GraalVM";

#[derive(Copy, Clone, Debug, PartialEq)]
#[derive(Copy, Clone, Debug, PartialEq, Default)]
pub enum Edition {
/// GraalVM CE (Community Edition).
#[default]
Community,
/// Oracle GraalVM (Formerly GraalVM EE, Enterprise Edition)
Enterprise,
Expand Down

0 comments on commit 47da811

Please sign in to comment.