make clippy happy

This commit is contained in:
Bram van Neerven 2022-08-28 00:11:28 +02:00
parent bbda23bafb
commit d83b778cad
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ impl<'a> GraphiQLSource<'a> {
let graphiql_subscription_url = self
.subscription_endpoint
.map(|endpoint| format!("'{}'", endpoint))
.unwrap_or("undefined".into());
.unwrap_or_else(|| "undefined".into());
let graphiql_headers = match self.headers {
Some(headers) => serde_json::to_string(&headers).unwrap(),
None => "undefined".into(),