Update wasm-bindgen and fix cargo config (#853)

* Update wasm-bindgen and fix cargo config

* clippy
This commit is contained in:
Justin Starry 2020-01-08 15:08:32 +08:00 committed by GitHub
parent 5d27094370
commit 99220f542f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 12 deletions

View File

@ -1,8 +1,5 @@
[target.'cfg(not(not(feature = "doc_test")))']
[build]
target = 'wasm32-unknown-unknown'
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))']
runner = 'wasm-bindgen-test-runner'
[alias]
doc_test = "test --doc --features doc_test"

View File

@ -30,7 +30,7 @@ install:
- rustup component add clippy
- rustup target add wasm32-unknown-unknown
- cargo install cargo-update || true
- cargo install-update-config --version =0.2.57 wasm-bindgen-cli
- cargo install-update-config --version =0.2.58 wasm-bindgen-cli
- cargo install-update wasm-bindgen-cli
- LATEST_CHROMEDRIVER_VERSION=`curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"`
- curl --retry 5 -LO "https://chromedriver.storage.googleapis.com/${LATEST_CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"

View File

@ -38,8 +38,7 @@ toml = { version = "0.5", optional = true }
yew-macro = { version = "0.11.1", path = "crates/macro" }
[target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dependencies]
wasm-bindgen = "0.2.57"
wasm-bindgen-futures = "0.4.4"
wasm-bindgen = "0.2.58"
[target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dev-dependencies]
wasm-bindgen-test = "0.3.4"

View File

@ -12,5 +12,16 @@ fi
cargo test --features wasm_test --target wasm32-unknown-unknown
cargo test --test macro_test
cargo test --test derive_props_test
cargo doc_test --all-features
(cd crates/macro && cargo doc_test)
# Disable cargo config for doc tests because the default target prevents doc
# tests from running
set +e
mv .cargo/config .cargo/config.tmp
cargo test --doc --all-features
doc_test_failed=$?
(cd crates/macro && cargo test --doc)
macro_doc_test_failed=$?
mv .cargo/config.tmp .cargo/config
if (($doc_test_failed)) || (($macro_doc_test_failed)); then
exit 1
fi

View File

@ -26,4 +26,4 @@ features = [
]
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
wasm-bindgen = "0.2.57"
wasm-bindgen = "0.2.58"

View File

@ -9,4 +9,4 @@ yew = { path = "../.." }
stdweb = "^0.4.20"
[target.'cfg(all(target_arch = "wasm32", not(cargo_web)))'.dependencies]
wasm-bindgen = "0.2.57"
wasm-bindgen = "0.2.58"

View File

@ -73,7 +73,7 @@ impl HandlerId {
self.0
}
/// Indicates if a handler id corresponds to callback in the Agent runtime.
pub fn is_respondable(&self) -> bool {
pub fn is_respondable(self) -> bool {
self.1
}
}