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 8 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
6 changes: 3 additions & 3 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 @@ -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.

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
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
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/derive_props_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 derive_props() {
let t = trybuild::TestCases::new();
t.pass("tests/derive_props/pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/function_attr_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 tests() {
let t = trybuild::TestCases::new();
t.pass("tests/function_component_attr/*-pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/hook_attr_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 tests() {
let t = trybuild::TestCases::new();
t.pass("tests/hook_attr/*-pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/hook_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 tests() {
let t = trybuild::TestCases::new();
t.pass("tests/hook_macro/*-pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/html_macro_test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use yew::{html, html_nested};

#[allow(dead_code)]
#[rustversion::attr(stable(1.60), test)]
#[rustversion::attr(stable(1.64), test)]
fn html_macro() {
let t = trybuild::TestCases::new();

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/tests/props_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 props_macro() {
let t = trybuild::TestCases::new();
t.pass("tests/props_macro/*-pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-macro/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ edition = "2021"
license = "MIT OR Apache-2.0"
description = "Contains macros used with yew-router"
repository = "https://github.com/yewstack/yew"
rust-version = "1.60.0"
rust-version = "1.64.0"

[lib]
proc-macro = true
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-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"
args = ["test"]

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-macro/tests/routable_derive_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 tests() {
let t = trybuild::TestCases::new();
t.pass("tests/routable_derive/*-pass.rs");
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keywords = ["web", "yew", "router"]
categories = ["gui", "web-programming"]
description = "A router implementation for the Yew framework"
repository = "https://github.com/yewstack/yew"
rust-version = "1.60.0"
rust-version = "1.64.0"

[dependencies]
yew = { version = "0.20.0", path = "../yew", default-features= false }
Expand Down
6 changes: 3 additions & 3 deletions packages/yew/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ keywords = ["web", "webasm", "javascript"]
categories = ["gui", "wasm", "web-programming"]
description = "A framework for creating reliable and efficient web applications"
readme = "../../README.md"
rust-version = "1.60.0"
rust-version = "1.64.0"

[dependencies]
console_error_panic_hook = "0.1"
gloo = "0.8"
indexmap = { version = "1", features = ["std"] }
indexmap = { version = "2", features = ["std"] }
js-sys = "0.3"
slab = "0.4"
wasm-bindgen = "0.2"
yew-macro = { version = "^0.20.0", path = "../yew-macro" }
thiserror = "1.0"
futures = { version = "0.3", default-features = false, features = ["std"] }
html-escape = { version = "0.2.13", optional = true }
implicit-clone = { version = "0.3", features = ["map"] }
implicit-clone = { version = "0.3.8", features = ["map"] }
base64ct = { version = "1.6.0", features = ["std"], optional = true }
bincode = { version = "1.3.3", optional = true }
serde = { version = "1", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/src/functional/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ where
};

Self {
_never: std::marker::PhantomData::default(),
_never: std::marker::PhantomData,
hook_ctx: HookContext::new(
scope,
re_render,
Expand Down
17 changes: 4 additions & 13 deletions packages/yew/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,25 @@ pub struct NodeSeq<IN, OUT>(Vec<OUT>, PhantomData<IN>);

impl<IN: Into<OUT>, OUT> From<IN> for NodeSeq<IN, OUT> {
fn from(val: IN) -> Self {
Self(vec![val.into()], PhantomData::default())
Self(vec![val.into()], PhantomData)
}
}

impl<IN: Into<OUT>, OUT> From<Option<IN>> for NodeSeq<IN, OUT> {
fn from(val: Option<IN>) -> Self {
Self(
val.map(|s| vec![s.into()]).unwrap_or_default(),
PhantomData::default(),
)
Self(val.map(|s| vec![s.into()]).unwrap_or_default(), PhantomData)
}
}

impl<IN: Into<OUT>, OUT> From<Vec<IN>> for NodeSeq<IN, OUT> {
fn from(val: Vec<IN>) -> Self {
Self(
val.into_iter().map(|x| x.into()).collect(),
PhantomData::default(),
)
Self(val.into_iter().map(|x| x.into()).collect(), PhantomData)
}
}

impl<IN: Into<OUT> + Clone, OUT> From<&ChildrenRenderer<IN>> for NodeSeq<IN, OUT> {
fn from(val: &ChildrenRenderer<IN>) -> Self {
Self(
val.iter().map(|x| x.into()).collect(),
PhantomData::default(),
)
Self(val.iter().map(|x| x.into()).collect(), PhantomData)
}
}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/getting-started/introduction.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bundler for Rust.
To install Rust, follow the [official instructions](https://www.rust-lang.org/tools/install).

:::important
The minimum supported Rust version (MSRV) for Yew is `1.60.0`. Older versions will not compile.
The minimum supported Rust version (MSRV) for Yew is `1.64.0`. Older versions will not compile.
You can check your toolchain version using
`rustup show` (under "active toolchain") or `rustc --version`. To update your
toolchain, run `rustup update`.
Expand Down
Loading