Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump indexmap from 1.9.3 to 2.0.0 #3322

Merged
merged 12 commits into from
Jul 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/main-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- uses: browser-actions/setup-geckodriver@latest
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: nanasess/setup-chromedriver@v1
- uses: nanasess/setup-chromedriver@v2

- name: Run doctest
run: |
Expand All @@ -67,7 +67,7 @@ jobs:
fail-fast: false
matrix:
toolchain:
- 1.60.0
- 1.64.0
- stable

steps:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: nanasess/setup-chromedriver@v1
- uses: nanasess/setup-chromedriver@v2

- name: Run tests - yew
run: |
Expand All @@ -116,7 +116,7 @@ jobs:
fail-fast: false
matrix:
toolchain:
- 1.60.0
- 1.64.0
- stable
- nightly

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
with:
token: ${{ secrets.GITHUB_TOKEN }}

- uses: nanasess/setup-chromedriver@v1
- uses: nanasess/setup-chromedriver@v2

- name: Run website code snippet tests
run: cargo test -p website-test --target wasm32-unknown-unknown
34 changes: 28 additions & 6 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Component for GrandParent {
match msg {
Msg::ButtonClick(childs_name) => {
// Update the shared state
let mut shared_state = Rc::make_mut(&mut self.state);
let shared_state = Rc::make_mut(&mut self.state);
shared_state.total_clicks += 1;
shared_state.last_clicked = Some(childs_name);
true
Expand Down
2 changes: 1 addition & 1 deletion examples/immutable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
implicit-clone = { version = "0.3", features = ["map"] }
implicit-clone = { version = "0.4", features = ["map"] }
wasm-bindgen = "0.2"
web-sys = "0.3"
yew = { path = "../../packages/yew", features = ["csr"] }
2 changes: 1 addition & 1 deletion packages/yew-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ license = "MIT OR Apache-2.0"
keywords = ["web", "wasm", "frontend", "webasm", "webassembly"]
categories = ["gui", "web-programming", "wasm"]
description = "A framework for making client-side single-page apps"
rust-version = "1.60.0"
rust-version = "1.64.0"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/Makefile.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tasks.test]
clear = true
toolchain = "1.60.0"
toolchain = "1.64.0"
command = "cargo"
# test target can be optionally specified like `cargo make test html_macro`,
args = ["test", "${@}"]
Expand Down
4 changes: 2 additions & 2 deletions packages/yew-macro/src/hook/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ pub fn hook_impl(hook: HookFn) -> syn::Result<TokenStream> {

let inner_type_impl = if hook_sig.needs_boxing {
let with_output = !matches!(hook_sig.output_type, Type::ImplTrait(_),);
let inner_fn_rt = with_output.then(|| &inner_fn_rt);
let output_type = with_output.then(|| &output_type);
let inner_fn_rt = with_output.then_some(&inner_fn_rt);
let output_type = with_output.then_some(&output_type);

let hook_lifetime = &hook_sig.hook_lifetime;
let hook_lifetime_plus = quote! { #hook_lifetime + };
Expand Down
138 changes: 81 additions & 57 deletions packages/yew-macro/tests/classes_macro/classes-fail.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -11,77 +11,93 @@ error: string literals must not contain more than one class (hint: use `"two", "
| ^^^^^^^^^^^

error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:4:14
|
4 | classes!(42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
--> tests/classes_macro/classes-fail.rs:4:14
|
4 | classes!(42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`

error[E0277]: the trait bound `Classes: From<{float}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:5:14
|
5 | classes!(42.0);
| ^^^^ the trait `From<{float}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{float}`
--> tests/classes_macro/classes-fail.rs:5:14
|
5 | classes!(42.0);
| ^^^^ the trait `From<{float}>` is not implemented for `Classes`
|
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{float}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`

error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:9:14
|
9 | classes!(vec![42]);
| ^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Vec<{integer}>`
--> tests/classes_macro/classes-fail.rs:9:14
|
9 | classes!(vec![42]);
| ^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Vec<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
= note: required because of the requirements on the impl of `Into<Classes>` for `Vec<{integer}>`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
|
| pub fn push<T: Into<Self>>(&mut self, class: T) {
| ^^^^^^^^^^ required by this bound in `Classes::push`

error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
--> tests/classes_macro/classes-fail.rs:13:14
|
13 | classes!(some);
| ^^^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
= note: required because of the requirements on the impl of `From<Option<{integer}>>` for `Classes`
= note: 1 redundant requirement hidden
Expand All @@ -98,12 +114,16 @@ error[E0277]: the trait bound `Classes: From<u32>` is not satisfied
14 | classes!(none);
| ^^^^ the trait `From<u32>` is not implemented for `Classes`
|
= help: the following implementations were found:
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `u32`
= note: required because of the requirements on the impl of `From<Option<u32>>` for `Classes`
= note: 1 redundant requirement hidden
Expand All @@ -120,12 +140,16 @@ error[E0277]: the trait bound `Classes: From<{integer}>` is not satisfied
16 | classes!("one", 42);
| ^^ the trait `From<{integer}>` is not implemented for `Classes`
|
= help: the following implementations were found:
= help: the following other types implement trait `From<T>`:
<Classes as From<&'static str>>
<Classes as From<&Option<T>>>
<Classes as From<&String>>
<Classes as From<&[T]>>
and 6 others
<Classes as From<&implicit_clone::unsync::IString>>
<Classes as From<Cow<'static, str>>>
<Classes as From<Option<T>>>
<Classes as From<String>>
and $N others
= note: required because of the requirements on the impl of `Into<Classes>` for `{integer}`
note: required by a bound in `Classes::push`
--> $WORKSPACE/packages/yew/src/html/classes.rs
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/classes_macro_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)]
#[rustversion::attr(stable(1.64), test)]
fn classes_macro() {
let t = trybuild::TestCases::new();
t.pass("tests/classes_macro/*-pass.rs");
Expand Down
Loading
Loading