Skip to content

Commit 991d659

Browse files
committed
Ruby: use unwrap_or_else to construct object only when needed
1 parent 976faf9 commit 991d659

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/extractor/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fn main() -> std::io::Result<()> {
8181
.with_level(true)
8282
.with_env_filter(
8383
tracing_subscriber::EnvFilter::try_from_default_env()
84-
.unwrap_or(tracing_subscriber::EnvFilter::new("ruby_extractor=warn")),
84+
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("ruby_extractor=warn")),
8585
)
8686
.init();
8787
tracing::warn!("Support for Ruby is currently in Beta: https://git.io/codeql-language-support");

0 commit comments

Comments
 (0)