Skip to content

Commit 32f7667

Browse files
committed
Apply clippy suggestions on graphql-client-web
1 parent b9168ba commit 32f7667

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

graphql_client_web/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ impl Client {
138138
JsFuture::from(text_promise).map_err(|_| ClientError::ResponseText)
139139
})
140140
.and_then(|text| {
141-
let response_text = text.as_string().unwrap_or_else(|| String::new());
141+
let response_text = text.as_string().unwrap_or_default();
142142
debug!("response text as string: {:?}", response_text);
143143
serde_json::from_str(&response_text).map_err(|_| ClientError::ResponseShape)
144144
})

graphql_client_web/tests/web.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ fn test_germany() -> impl Future<Item = (), Error = JsValue> {
4545
})
4646
.map_err(|err| {
4747
panic!("{:?}", err);
48-
JsValue::NULL
4948
})
5049
}
5150

0 commit comments

Comments
 (0)