Make Clippy happy for 1.79 Rust
This commit is contained in:
parent
9bdf8cf379
commit
a3a17bf6e5
2 changed files with 5 additions and 11 deletions
|
@ -12,25 +12,19 @@ pub fn graphiql_source(
|
|||
graphql_endpoint_url: &str,
|
||||
subscriptions_endpoint_url: Option<&str>,
|
||||
) -> String {
|
||||
let subscriptions_endpoint = if let Some(sub_url) = subscriptions_endpoint_url {
|
||||
sub_url
|
||||
} else {
|
||||
""
|
||||
};
|
||||
|
||||
include_str!("graphiql.html").replace(
|
||||
"<!-- inject -->",
|
||||
&format!(
|
||||
// language=JavaScript
|
||||
"
|
||||
var JUNIPER_URL = '{graphql_url}';
|
||||
var JUNIPER_SUBSCRIPTIONS_URL = '{graphql_subscriptions_url}';
|
||||
var JUNIPER_URL = '{juniper_url}';
|
||||
var JUNIPER_SUBSCRIPTIONS_URL = '{juniper_subscriptions_url}';
|
||||
|
||||
{grahiql_js}
|
||||
|
||||
",
|
||||
graphql_url = graphql_endpoint_url,
|
||||
graphql_subscriptions_url = subscriptions_endpoint,
|
||||
juniper_url = graphql_endpoint_url,
|
||||
juniper_subscriptions_url = subscriptions_endpoint_url.unwrap_or_default(),
|
||||
grahiql_js = include_str!("graphiql.js"),
|
||||
),
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle, u32};
|
||||
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
|
Loading…
Reference in a new issue