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
juniper/src
|
@ -12,25 +12,19 @@ pub fn graphiql_source(
|
||||||
graphql_endpoint_url: &str,
|
graphql_endpoint_url: &str,
|
||||||
subscriptions_endpoint_url: Option<&str>,
|
subscriptions_endpoint_url: Option<&str>,
|
||||||
) -> String {
|
) -> String {
|
||||||
let subscriptions_endpoint = if let Some(sub_url) = subscriptions_endpoint_url {
|
|
||||||
sub_url
|
|
||||||
} else {
|
|
||||||
""
|
|
||||||
};
|
|
||||||
|
|
||||||
include_str!("graphiql.html").replace(
|
include_str!("graphiql.html").replace(
|
||||||
"<!-- inject -->",
|
"<!-- inject -->",
|
||||||
&format!(
|
&format!(
|
||||||
// language=JavaScript
|
// language=JavaScript
|
||||||
"
|
"
|
||||||
var JUNIPER_URL = '{graphql_url}';
|
var JUNIPER_URL = '{juniper_url}';
|
||||||
var JUNIPER_SUBSCRIPTIONS_URL = '{graphql_subscriptions_url}';
|
var JUNIPER_SUBSCRIPTIONS_URL = '{juniper_subscriptions_url}';
|
||||||
|
|
||||||
{grahiql_js}
|
{grahiql_js}
|
||||||
|
|
||||||
",
|
",
|
||||||
graphql_url = graphql_endpoint_url,
|
juniper_url = graphql_endpoint_url,
|
||||||
graphql_subscriptions_url = subscriptions_endpoint,
|
juniper_subscriptions_url = subscriptions_endpoint_url.unwrap_or_default(),
|
||||||
grahiql_js = include_str!("graphiql.js"),
|
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};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue