Skip to content

Commit

Permalink
unwrap_or_else
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsp committed Sep 6, 2023
1 parent db3dc06 commit 562e47e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion control_plane/src/bin/neon_local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ fn handle_tenant(tenant_match: &ArgMatches, env: &mut local_env::LocalEnv) -> an
.unwrap_or_default();

// If tenant ID was not specified, generate one
let tenant_id = parse_tenant_id(create_match)?.unwrap_or(TenantId::generate());
let tenant_id = parse_tenant_id(create_match)?.unwrap_or_else(TenantId::generate);

let generation = if env.pageserver.control_plane_api.is_some() {
// We must register the tenant with the attachment service, so
Expand Down

0 comments on commit 562e47e

Please sign in to comment.