Skip to content

Commit 59d9ec6

Browse files
committed
Move graphql_client_web to the common cargo workspace
1 parent 446aa42 commit 59d9ec6

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed
File renamed without changes.

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ script:
2020
- cargo test --all
2121
- cargo build --manifest-path=./graphql_client/examples/github/Cargo.toml
2222
- cargo build --manifest-path=./graphql_client_cli/Cargo.toml
23-
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (cd graphql_client_web && cargo test --target wasm32-unknown-unknown) fi
23+
- if [ "$TRAVIS_RUST_VERSION" = "stable" ]; then (GECKODRIVER=`pwd`/geckodriver cargo test --manifest-path=./graphql_client_web/Cargo.toml --target wasm32-unknown-unknown) fi

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ members = [
33
"graphql_client_cli",
44
"graphql_client_codegen",
55
"graphql_client",
6+
"graphql_client_web",
67
"graphql_client/examples/example_module",
78
"graphql_client/examples/github",
89
"graphql_query_derive",

graphql_client_web/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,3 @@ features = [
3131
serde = "*"
3232
serde_derive = "*"
3333
wasm-bindgen-test = "0.2.25"
34-
35-
[workspace]
36-
members = ["."]

graphql_client_web/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ impl Client {
7676
}
7777

7878
/// Perform a query.
79+
///
80+
// Lint disabled: We can pass by value because it's always an empty struct.
81+
#[allow(clippy::needless_pass_by_value)]
7982
pub fn call<Q: GraphQLQuery + 'static>(
8083
&self,
8184
_query: Q,
@@ -115,9 +118,9 @@ impl Client {
115118
.map_err(|_| ClientError::RequestError)?;
116119

117120
for (header_name, header_value) in custom_headers.iter() {
118-
headers.set(header_name, header_value)
121+
headers
122+
.set(header_name, header_value)
119123
.map_err(|_| ClientError::RequestError)?;
120-
121124
}
122125

123126
Ok((window, request))

scripts/install_geckodriver.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ set -ex
66

77
wget https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-linux64.tar.gz
88
tar xzf geckodriver-v0.23.0-linux64.tar.gz
9-
mv geckodriver /usr/local/bin/

0 commit comments

Comments
 (0)