diff --git a/lighthouse/environment/src/lib.rs b/lighthouse/environment/src/lib.rs index e88dabe9f0a..80539f88a84 100644 --- a/lighthouse/environment/src/lib.rs +++ b/lighthouse/environment/src/lib.rs @@ -396,7 +396,7 @@ impl Environment { } future::Either::Left((Err(e), _)) => Err(e.into()), future::Either::Right(((res, _, _), _)) => { - res.ok_or("Handler channel closed".to_string()) + res.ok_or_else(|| "Handler channel closed".to_string()) } } }