The destroyed field on the agent state was never set, so the early
return in `run` didn't prevent crashes when agents receive messages
after they are destroyed.
* Implement .into_inner() for Json
This allows users to use .into_inner() the same way it would be possible
in the serde crate. Previously, it was only possible via dump.0 (which
looks gross), or Json(dump).
* Fix an error using HtmlBlock
The definition uses {content, brace} but the usage used [brace, content}
* Update packages/yew/src/format/json.rs
Co-authored-by: Simon <simon@siku2.io>
* update rust version for macro test to 1.51
* enable const generic tests
* run integration tests using MSRV
* am blind
* clippy, fmt
* apply suggestion
The `yew_services::fetch::tests::fetch_referrer_same_origin_url`
test broke for Chrome after Chrome changed the default
`Referrer-Policy` from `no-referrer-when-downgrade` to
`strict-origin-when-cross-origin`
(See: https://developers.google.com/web/updates/2020/07/referrer-policy-new-chrome-default)
The test makes a cross-site fetch (from the headless test
origin to the httpbin server) and the new default policy
causes the path to be stripped from the `Referer` header,
whereas the old policy didn't.
Fix this problem by explicitly setting the referrer policy
to the previous default `no-referrer-when-downgrade` when
making the test fetch. This makes the test pass with Chrome
and should have no effect for other browsers which are
still using a default of `no-referrer-when-downgrade`
(i.e. Firefox).
Tested with both Chrome and Firefox:
* wasm-pack test --chrome --headless -- --features "wasm_test httpbin_test"
* wasm-pack test --firefox --headless -- --features "wasm_test httpbin_test"
During the connection handshake:
* `WebSocketTask::is_active` erronously returns `false`.
* Dropping `WebSocketTask` drops the `WebSocket` without
calling `WebSocket::close` on it, resulting in the WebSocket
"leaking"; it will typically continue the connection
handshake and remain connected to the server, despite the
client having dropped the object representing it.
Fix these by considering the task to be active if the
WebSocket `ready_state` is *either* `WebSocket::OPEN` or
`WebSocket::CONNECTING`.
Add two tests to check that a `WebSocketTask` returns `true`
for `is_active` while it's connecting, and that dropping
the `WebSocketTask` while it's connecting results in
the underlying WebSocket being closed properly.
In `test_invalid_url_error`:
* First `assert` followed by `if let` is redundant.
* Second `if let` requires suppression of
`irrefutable_let_patterns` since there is only one variant.
* Second `if let` necessitates a third "catch-all else" assert.
Replacing all of this with a single `assert!(matches!(...))`
makes it easier to read and removes the need for the
lint suppression without changing what's being tested.
* time for more hygiene
* update corresponding tests
* while I'm at it
* now let's fix the actual issue
* fix the publish examples CI while I'm at it
* resolve clippy warnings
* Generic functional components
* Add some tests
* Clippy
* Fix generic-props-fail snapshot
* Add docs for generic function components
* Add some more docs
* Fix trait bounds in docs
* Fix docs
* Improve lifetime error messages
* Fix parsing for const generics
* Use fully qualified path for pass test
* Remove TODO message
* Suggested change
Co-authored-by: Simon <simon@siku2.io>
* Update test
Co-authored-by: Simon <simon@siku2.io>
* Update test
Co-authored-by: Simon <simon@siku2.io>
* Update stderr snapshots
* Combine quote implementations
* Fix warning about type alias bounds
Co-authored-by: Simon <simon@siku2.io>