diff --git a/.github/workflows/autopublish.yml b/.github/workflows/autopublish.yml index 01b008f7ce9..43deb7e2196 100644 --- a/.github/workflows/autopublish.yml +++ b/.github/workflows/autopublish.yml @@ -15,7 +15,7 @@ jobs: - name: Setup node uses: actions/setup-node@v1 with: - node-version: '12.x' + node-version: "12.x" - name: Install dependencies run: cd website && yarn install && cd ../ - name: Build site diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yml similarity index 100% rename from .github/workflows/benchmark.yaml rename to .github/workflows/benchmark.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 00000000000..267c45eb877 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,225 @@ +name: Pull Request + +on: + pull_request: + push: + branches: [master] + +jobs: + lint: + name: Format & Clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + components: rustfmt, clippy + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + yew-stdweb/target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}- + + - name: Run fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + - name: Run clippy + if: always() + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets -- -D warnings + + - name: Run clippy - yew with all features + if: always() + run: | + cd yew + cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings + + - name: Run clippy - yew-stdweb with all features + if: always() + run: | + cd yew-stdweb + cargo clippy --all-targets --features "cbor msgpack toml yaml" -- -D warnings + + check_examples: + name: Check Examples + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + profile: minimal + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}- + + - name: Run check + run: | + cd examples + cargo check --all-targets + + doc_tests: + name: Documentation Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + override: true + profile: minimal + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}- + + - name: Run doctest + uses: actions-rs/cargo@v1 + with: + command: test + args: --doc + + - name: Run doctest - yew with features + run: | + cd yew + cargo test --doc --features "doc_test wasm_test yaml msgpack cbor toml" + + - name: Run doctest - yew-stdweb with features + run: | + # Sadly we can't run the tests on yew-stdweb as the snippets use `yew`, not `yew_stdweb` so the imports wouldn't work. + # To fix this we just run them on yew but with yew-stdweb's default features enabled. + cd yew + cargo test --doc \ + --no-default-features --features "services agent std_web" \ + --features "doc_test wasm_test yaml msgpack cbor toml" + + integration_tests: + name: Integration Tests on ${{ matrix.toolchain }} + runs-on: ubuntu-latest + services: + httpbin: + image: kennethreitz/httpbin@sha256:599fe5e5073102dbb0ee3dbb65f049dab44fa9fc251f6835c9990f8fb196a72b + ports: + - 8080:80 + + strategy: + matrix: + toolchain: + - 1.45.0 # MSRV + - stable + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + target: wasm32-unknown-unknown + override: true + profile: minimal + + - name: Install wasm-pack + run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + yew-stdweb/target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}- + + # FIXME: Only needed because of + - name: Install geckodriver + run: | + cd ~ + mkdir geckodriver + curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz + tar -xzf geckodriver-*-linux64.tar.gz -C geckodriver + echo "::add-path::$HOME/geckodriver" + + - name: Run tests - yew + env: + HTTPBIN_URL: "http://localhost:8080" + run: | + cd yew + wasm-pack test --chrome --firefox --headless -- --features "wasm_test httpbin_test" + + - name: Run tests - yew-stdweb + env: + HTTPBIN_URL: "http://localhost:8080" + run: | + cd yew-stdweb + # FIXME: Chrome really doesn't seem to like yew-stdweb + wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test" + + - name: Run tests - yew-functional + run: | + cd yew-functional + wasm-pack test --chrome --firefox --headless + + unit_tests: + name: Unit Tests on ${{ matrix.toolchain }} + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - 1.45.0 # MSRV + - stable + - nightly + + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + override: true + profile: minimal + + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }} + restore-keys: | + cargo-${{ runner.os }}- + + - name: Run tests + run: | + packages=("yew-components" "yew-functional" "yew-macro" "yew-router" "yew-router-macro" "yew-router-route-parser" "yewtil") + for package in "${packages[@]}"; do + (cd "$package" && cargo test) + done diff --git a/.mergify.yml b/.mergify.yml index c55aa85d0d2..ae5e4b78e3d 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -2,14 +2,14 @@ pull_request_rules: - name: automatic merge on CI success - admin conditions: - author=@yewstack/maintainers - - status-success=Travis CI - Pull Request + - status-success~=Pull Request - label=automerge actions: merge: method: squash - name: remove automerge label on CI failure conditions: - - status-failure=Travis CI - Pull Request + - status-failure~=Pull Request - label=automerge actions: label: diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b542f7c155c..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,49 +0,0 @@ -branches: - only: - - staging - - trying - - master - -dist: trusty -language: rust -sudo: false -addons: - firefox: latest - -cache: cargo -before_cache: - - ./ci/clear_cache.sh - -rust: - - 1.42.0 # min supported - - stable - - beta - -services: - - docker - -matrix: - allow_failures: - - rust: beta - fast_finish: true - -before_install: - - docker run -d -p 8000:80 kennethreitz/httpbin@sha256:599fe5e5073102dbb0ee3dbb65f049dab44fa9fc251f6835c9990f8fb196a72b - -install: - - nvm install 9 - - rustup component add rustfmt - - rustup component add clippy - - rustup install stable - - rustup target add wasm32-unknown-unknown - - cargo +stable install wasm-pack - - curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz - - mkdir geckodriver - - tar -xzf geckodriver-v0.26.0-linux64.tar.gz -C geckodriver - - export PATH="$PATH:$PWD/geckodriver" - - geckodriver --version - - ./ci/install_cargo_web.sh - -script: - - ./ci/run_stable_checks.sh - - HTTPBIN_URL="http://localhost:8000" ./ci/run_tests.sh diff --git a/Cargo.toml b/Cargo.toml index b1d8ad6dc2a..0beae75fbec 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,8 +42,8 @@ members = [ "examples/js_callback", "examples/keyed_list", "examples/large_table", - "examples/minimal_wp", "examples/minimal", + "examples/minimal_wp", "examples/mount_point", "examples/multi_thread", "examples/nested_list", diff --git a/ci/clear_cache.sh b/ci/clear_cache.sh deleted file mode 100755 index f5227d7be2d..00000000000 --- a/ci/clear_cache.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -set -x - -# inspired by https://github.com/rust-analyzer/rust-analyzer/blob/master/.travis.yml -find ./target/debug -maxdepth 1 -type f -delete -find ./target/tests/target/debug -maxdepth 1 -type f -delete -find ./target/asmjs-unknown-emscripten/debug -maxdepth 1 -type f -delete -find ./target/wasm32-unknown-emscripten/debug -maxdepth 1 -type f -delete -find ./target/wasm32-unknown-unknown/debug -maxdepth 1 -type f -delete -rm -fr ./target/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./target/tests/target/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./target/asmjs-unknown-emscripten/debug/{deps,.fingerprint}/{*yew*,*\.was,*\.js*,*test*} -rm -fr ./target/wasm32-unknown-emscripten/debug/{deps,.fingerprint}/{*yew*,*\.was*,*\.js*,*test*} -rm -fr ./target/wasm32-unknown-unknown/debug/{deps,.fingerprint}/{*yew*,*\.was*,*\.js*,*test*} -rm -fr ./target/debug/incremental -rm -fr ./target/tests/target/debug/incremental -rm -fr ./target/asmjs-unknown-emscripten/debug/incremental -rm -fr ./target/wasm32-unknown-emscripten/debug/incremental -rm -fr ./target/wasm32-unknown-unknown/debug/incremental -rm -f ./target/.rustc_info.json -rm -f ./target/tests/target/.rustc_info.json -rm -fr ./target/wasm32-unknown-unknown/wbg-tmp -rm -fr /home/travis/.cargo/registry/index/github.com-* diff --git a/ci/install_cargo_web.sh b/ci/install_cargo_web.sh deleted file mode 100755 index bf09f5a615f..00000000000 --- a/ci/install_cargo_web.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail -IFS=$'\n\t' - -CARGO_WEB_RELEASE=$(curl -L -s -H 'Accept: application/json' https://github.com/koute/cargo-web/releases/latest) -CARGO_WEB_VERSION=$(echo $CARGO_WEB_RELEASE | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') -CARGO_WEB_URL="https://github.com/koute/cargo-web/releases/download/$CARGO_WEB_VERSION/cargo-web-x86_64-unknown-linux-gnu.gz" - -echo "Downloading cargo-web from: $CARGO_WEB_URL" -curl -L $CARGO_WEB_URL | gzip -d > cargo-web -chmod +x cargo-web - -mkdir -p ~/.cargo/bin -mv cargo-web ~/.cargo/bin diff --git a/yew-components/Cargo.toml b/yew-components/Cargo.toml index 54fbeecfdd6..b7e830b9f95 100644 --- a/yew-components/Cargo.toml +++ b/yew-components/Cargo.toml @@ -2,9 +2,7 @@ name = "yew-components" version = "0.2.0" edition = "2018" -authors = [ - "Yew Maintainers ", -] +authors = ["Yew Maintainers "] repository = "https://github.com/yewstack/yew" homepage = "https://github.com/yewstack/yew" documentation = "https://docs.rs/yew-components/" @@ -13,9 +11,6 @@ keywords = ["web", "asmjs", "webasm", "javascript"] categories = ["gui", "web-programming"] description = "A collection of community-created Yew components" -[badges] -travis-ci = { repository = "yewstack/yew" } - [dependencies] wasm-bindgen = "0.2.60" web-sys = "0.3" diff --git a/yew-functional/Cargo.toml b/yew-functional/Cargo.toml index efe1039c26c..be48e41355a 100644 --- a/yew-functional/Cargo.toml +++ b/yew-functional/Cargo.toml @@ -10,10 +10,6 @@ keywords = ["web", "wasm", "frontend", "webasm", "webassembly"] categories = ["gui", "web-programming", "wasm"] description = "A framework for making client-side single-page apps" - -[badges] -travis-ci = { repository = "yewstack/yew" } - [dev-dependencies] wasm-bindgen-test = "0.3.9" web-sys = "0.3.36" diff --git a/yew-macro/Cargo.toml b/yew-macro/Cargo.toml index 82a38c9a056..e8f40cb79eb 100644 --- a/yew-macro/Cargo.toml +++ b/yew-macro/Cargo.toml @@ -11,9 +11,6 @@ keywords = ["web", "wasm", "frontend", "webasm", "webassembly"] categories = ["gui", "web-programming", "wasm"] description = "A framework for making client-side single-page apps" -[badges] -travis-ci = { repository = "yewstack/yew" } - [lib] proc-macro = true diff --git a/yew-macro/src/derive_props/field.rs b/yew-macro/src/derive_props/field.rs index d59f66bbb07..d80798018ed 100644 --- a/yew-macro/src/derive_props/field.rs +++ b/yew-macro/src/derive_props/field.rs @@ -26,10 +26,7 @@ pub struct PropField { impl PropField { /// All required property fields are wrapped in an `Option` pub fn is_required(&self) -> bool { - match self.attr { - PropAttr::Required { .. } => true, - _ => false, - } + matches!(self.attr, PropAttr::Required { .. }) } /// This step name is descriptive to help a developer realize they missed a required prop diff --git a/yew-router/src/matcher/matcher_impl.rs b/yew-router/src/matcher/matcher_impl.rs index 62994bac801..63d197138d6 100644 --- a/yew-router/src/matcher/matcher_impl.rs +++ b/yew-router/src/matcher/matcher_impl.rs @@ -380,7 +380,6 @@ mod integration_test { .expect("Should parse"); let settings = MatcherSettings { case_insensitive: true, - ..Default::default() }; matcher_impl::(&x, settings, "/HeLLo").expect("should match"); } diff --git a/yew-stdweb/Cargo.toml b/yew-stdweb/Cargo.toml index 14d40a6d2d4..54c26bb0730 100644 --- a/yew-stdweb/Cargo.toml +++ b/yew-stdweb/Cargo.toml @@ -3,8 +3,8 @@ name = "yew-stdweb" version = "0.17.2" edition = "2018" authors = [ - "Denis Kolodin ", - "Justin Starry ", + "Denis Kolodin ", + "Justin Starry ", ] repository = "https://github.com/yewstack/yew" homepage = "https://github.com/yewstack/yew" @@ -15,9 +15,6 @@ keywords = ["web", "asmjs", "webasm", "javascript"] categories = ["gui", "web-programming"] description = "A framework for making client-side single-page apps" -[badges] -travis-ci = { repository = "yewstack/yew" } - [dependencies] anyhow = "1" anymap = "0.12" @@ -45,7 +42,9 @@ thiserror = "1" toml = { version = "0.5", optional = true } wasm-bindgen = { version = "0.2.60", optional = true } wasm-bindgen-futures = { version = "0.4", optional = true } -yew-macro = { version = "0.17.0", path = "../yew-macro", features = ["std_web"] } +yew-macro = { version = "0.17.0", path = "../yew-macro", features = [ + "std_web" +] } # Changes here must be reflected in `build.rs` [target.'cfg(all(target_arch = "wasm32", not(target_os="wasi"), not(cargo_web)))'.dependencies] diff --git a/yew/Cargo.toml b/yew/Cargo.toml index 0d98078514d..17cda9d728f 100644 --- a/yew/Cargo.toml +++ b/yew/Cargo.toml @@ -3,8 +3,8 @@ name = "yew" version = "0.17.2" edition = "2018" authors = [ - "Denis Kolodin ", - "Justin Starry ", + "Denis Kolodin ", + "Justin Starry ", ] repository = "https://github.com/yewstack/yew" homepage = "https://github.com/yewstack/yew" @@ -15,9 +15,6 @@ keywords = ["web", "asmjs", "webasm", "javascript"] categories = ["gui", "web-programming"] description = "A framework for making client-side single-page apps" -[badges] -travis-ci = { repository = "yewstack/yew" } - [dependencies] anyhow = "1" anymap = "0.12" @@ -129,7 +126,15 @@ bincode = "1" [features] default = ["services", "agent", "web_sys"] std_web = ["stdweb", "yew-macro/std_web"] -web_sys = ["console_error_panic_hook", "futures", "gloo", "js-sys", "web-sys", "wasm-bindgen", "wasm-bindgen-futures"] +web_sys = [ + "console_error_panic_hook", + "futures", + "gloo", + "js-sys", + "web-sys", + "wasm-bindgen", + "wasm-bindgen-futures" +] doc_test = [] wasm_test = [] httpbin_test = [] diff --git a/yew/src/callback.rs b/yew/src/callback.rs index 375e6003bb4..a3d74123446 100644 --- a/yew/src/callback.rs +++ b/yew/src/callback.rs @@ -156,11 +156,12 @@ pub(crate) mod test_util { impl Future for CallbackFuture { type Output = T; - fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { + fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { if let Some(output) = self.ready() { Poll::Ready(output) } else { - self.0.borrow_mut().waker = Some(cx.waker().clone()); + let handle = &self.0; + handle.borrow_mut().waker = Some(cx.waker().clone()); Poll::Pending } } diff --git a/yew/src/format/cbor.rs b/yew/src/format/cbor.rs index e6e1bda9ca9..f5251e438eb 100644 --- a/yew/src/format/cbor.rs +++ b/yew/src/format/cbor.rs @@ -1,7 +1,5 @@ //! Contains an implementation of CBOR serialization format. -use serde_cbor; - /// A representation of a CBOR data. Use it as wrapper to /// set a format you want to use for conversion: /// diff --git a/yew/src/format/msgpack.rs b/yew/src/format/msgpack.rs index c0135559259..2905d77627c 100644 --- a/yew/src/format/msgpack.rs +++ b/yew/src/format/msgpack.rs @@ -1,7 +1,5 @@ //! Contains an implementation of MessagePack serialization format. -use rmp_serde; - /// A representation of a MessagePack data. Use it as wrapper to /// set a format you want to use for conversion: /// diff --git a/yew/src/format/yaml.rs b/yew/src/format/yaml.rs index 6202742d393..6604f5f7846 100644 --- a/yew/src/format/yaml.rs +++ b/yew/src/format/yaml.rs @@ -1,7 +1,5 @@ //! Contains an implementation of YAML serialization format. -use serde_yaml; - /// A representation of a YAML data. Use it as wrapper to /// set a format you want to use for conversion: /// diff --git a/yew/src/html/scope.rs b/yew/src/html/scope.rs index b3be1688d7f..a2eb738ebae 100644 --- a/yew/src/html/scope.rs +++ b/yew/src/html/scope.rs @@ -383,10 +383,7 @@ where return; } - let first_update = match self.update { - ComponentUpdate::First => true, - _ => false, - }; + let first_update = matches!(self.update, ComponentUpdate::First); let should_update = match self.update { ComponentUpdate::First => true, @@ -642,7 +639,7 @@ mod tests { lifecycle: lifecycle.clone(), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -656,7 +653,7 @@ mod tests { create_message: Some(false), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -671,7 +668,7 @@ mod tests { view_message: RefCell::new(Some(true)), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -688,7 +685,7 @@ mod tests { view_message: RefCell::new(Some(false)), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -703,7 +700,7 @@ mod tests { rendered_message: RefCell::new(Some(false)), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -718,7 +715,7 @@ mod tests { rendered_message: RefCell::new(Some(true)), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), @@ -731,12 +728,12 @@ mod tests { test_lifecycle( Props { - lifecycle: lifecycle.clone(), + lifecycle, create_message: Some(true), update_message: RefCell::new(Some(true)), ..Props::default() }, - &vec![ + &[ "create".to_string(), "view".to_string(), "child rendered".to_string(), diff --git a/yew/src/services/fetch.rs b/yew/src/services/fetch.rs index 4495f52b0f4..e2b635f8b5d 100644 --- a/yew/src/services/fetch.rs +++ b/yew/src/services/fetch.rs @@ -262,10 +262,12 @@ mod tests { #[cfg(feature = "std_web")] assert!(resp.body().is_err()); #[cfg(feature = "web_sys")] - assert_eq!( - "TypeError: NetworkError when attempting to fetch resource.", - resp.body().as_ref().unwrap_err().to_string() - ); + assert!(resp + .body() + .as_ref() + .unwrap_err() + .to_string() + .starts_with("TypeError:")); } #[test] diff --git a/yew/src/virtual_dom/mod.rs b/yew/src/virtual_dom/mod.rs index 79af7c4ca2c..11f26c912ce 100644 --- a/yew/src/virtual_dom/mod.rs +++ b/yew/src/virtual_dom/mod.rs @@ -343,13 +343,14 @@ mod layout_tests { let parent_node: Node = parent_element.clone().into(); let end_node = document.create_text_node("END"); parent_node.append_child(&end_node).unwrap(); - let empty_node: VNode = VText::new("".into()).into(); + let mut empty_node: VNode = VText::new("".into()).into(); // Tests each layout independently let next_sibling = NodeRef::new(end_node.into()); for layout in layouts.iter() { // Apply the layout let mut node = layout.node.clone(); + #[cfg(feature = "wasm_test")] wasm_bindgen_test::console_log!("Independently apply layout '{}'", layout.name); node.apply(&parent_scope, &parent_element, next_sibling.clone(), None); assert_eq!( @@ -361,6 +362,7 @@ mod layout_tests { // Diff with no changes let mut node_clone = layout.node.clone(); + #[cfg(feature = "wasm_test")] wasm_bindgen_test::console_log!("Independently reapply layout '{}'", layout.name); node_clone.apply( &parent_scope, @@ -394,6 +396,7 @@ mod layout_tests { let mut ancestor: Option = None; for layout in layouts.iter() { let mut next_node = layout.node.clone(); + #[cfg(feature = "wasm_test")] wasm_bindgen_test::console_log!("Sequentially apply layout '{}'", layout.name); next_node.apply( &parent_scope, @@ -413,6 +416,7 @@ mod layout_tests { // Sequentially detach each layout for layout in layouts.into_iter().rev() { let mut next_node = layout.node.clone(); + #[cfg(feature = "wasm_test")] wasm_bindgen_test::console_log!("Sequentially detach layout '{}'", layout.name); next_node.apply( &parent_scope, @@ -430,9 +434,7 @@ mod layout_tests { } // Detach last layout - empty_node - .clone() - .apply(&parent_scope, &parent_element, next_sibling, ancestor); + empty_node.apply(&parent_scope, &parent_element, next_sibling, ancestor); assert_eq!( parent_element.inner_html(), "END", diff --git a/yew/src/virtual_dom/vnode.rs b/yew/src/virtual_dom/vnode.rs index deb92915661..ed596c01938 100644 --- a/yew/src/virtual_dom/vnode.rs +++ b/yew/src/virtual_dom/vnode.rs @@ -243,13 +243,13 @@ mod layout_tests { let layout1 = TestLayout { name: "1", - node: vref_node_1.into(), + node: vref_node_1, expected: "", }; let layout2 = TestLayout { name: "2", - node: vref_node_2.into(), + node: vref_node_2, expected: "", }; diff --git a/yewtil/src/fetch/request.rs b/yewtil/src/fetch/request.rs index 760ad89c238..bba2c1e3b69 100644 --- a/yewtil/src/fetch/request.rs +++ b/yewtil/src/fetch/request.rs @@ -79,7 +79,7 @@ impl Format for Json { /// per request. /// /// # Simplifying Example -/// ``` +/// ```no_run /// use yewtil::fetch::{FetchRequest, MethodBody, Json, Fetch}; /// use serde::Serialize; /// use serde::de::DeserializeOwned;