Skip to content

Commit a3a17bf

Browse files
committed
Make Clippy happy for 1.79 Rust
1 parent 9bdf8cf commit a3a17bf

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

juniper/src/http/graphiql.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,19 @@ pub fn graphiql_source(
1212
graphql_endpoint_url: &str,
1313
subscriptions_endpoint_url: Option<&str>,
1414
) -> String {
15-
let subscriptions_endpoint = if let Some(sub_url) = subscriptions_endpoint_url {
16-
sub_url
17-
} else {
18-
""
19-
};
20-
2115
include_str!("graphiql.html").replace(
2216
"<!-- inject -->",
2317
&format!(
2418
// language=JavaScript
2519
"
26-
var JUNIPER_URL = '{graphql_url}';
27-
var JUNIPER_SUBSCRIPTIONS_URL = '{graphql_subscriptions_url}';
20+
var JUNIPER_URL = '{juniper_url}';
21+
var JUNIPER_SUBSCRIPTIONS_URL = '{juniper_subscriptions_url}';
2822
2923
{grahiql_js}
3024
3125
",
32-
graphql_url = graphql_endpoint_url,
33-
graphql_subscriptions_url = subscriptions_endpoint,
26+
juniper_url = graphql_endpoint_url,
27+
juniper_subscriptions_url = subscriptions_endpoint_url.unwrap_or_default(),
3428
grahiql_js = include_str!("graphiql.js"),
3529
),
3630
)

juniper/src/types/scalars.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle, u32};
1+
use std::{char, fmt, marker::PhantomData, ops::Deref, rc::Rc, thread::JoinHandle};
22

33
use serde::{Deserialize, Serialize};
44

0 commit comments

Comments
 (0)