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

Update to edition 2021 #2354

Merged
merged 2 commits into from Jan 12, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/agents/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "agents"
version = "0.1.0"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/boids/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "boids"
version = "0.1.0"
authors = ["motoki saito <stmtk13044032@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion examples/contexts/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "contexts"
version = "0.1.0"
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/counter/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "counter"
version = "0.1.1"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/dyn_create_destroy_apps/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "dyn_create_destroy_apps"
version = "0.1.0"
authors = ["Nicklas Warming Jacobsen <nicklaswj@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/file_upload/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "file_upload"
version = "0.1.0"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/function_memory_game/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "function_memory_game"
version = "0.1.0"
authors = ["Howard.Zuo <leftstick@qq.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/function_todomvc/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "function_todomvc"
version = "0.1.0"
authors = ["Drew Hutton <drew.hutton@pm.me>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/futures/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "futures"
version = "0.1.0"
authors = ["Henry Zimmerman <zimhen7@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/game_of_life/Cargo.toml
Expand Up @@ -6,7 +6,7 @@ authors = [
"Ilya Bogdanov <fumlead@gmail.com",
"Junjie Huang <huangjj.27@qq.com>"
]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/inner_html/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "inner_html"
version = "0.1.0"
authors = ["Garrett Berg <vitiral@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/js_callback/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "js_callback"
version = "0.1.0"
authors = ["Scott Steele <scottlsteele@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/keyed_list/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "keyed_list"
version = "0.1.0"
authors = ["Thomas Lacroix <toto.rigolo@free.fr>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/mount_point/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "mount_point"
version = "0.1.0"
authors = ["Ben Berman <ben@standardbots.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/nested_list/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "nested_list"
version = "0.1.0"
authors = ["Justin Starry <justin.starry@icloud.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/node_refs/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "node_refs"
version = "0.1.0"
authors = ["Justin Starry <justin.starry@icloud.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/password_strength/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "password_strength"
version = "0.1.0"
authors = ["Philip Peterson <pc.peterso@gmail.com>"]
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/portals/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "portals"
version = "0.1.0"
authors = ["Martin Molzer <worldsbegin@gmx.de>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/router/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "router"
version = "0.1.0"
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/simple_ssr/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "simple_ssr"
version = "0.1.0"
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down
2 changes: 1 addition & 1 deletion examples/suspense/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "suspense"
version = "0.1.0"
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion examples/timer/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "timer"
version = "0.1.0"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/todomvc/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "todomvc"
version = "0.1.0"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/two_apps/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "two_apps"
version = "0.1.0"
authors = ["Denis Kolodin <deniskolodin@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/web_worker_fib/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "yew-worker-fib"
version = "0.1.0"
edition = "2018"
edition = "2021"
authors = ["Shrey Somaiya", "Zac Kologlu"]

[lib]
Expand Down
2 changes: 1 addition & 1 deletion examples/webgl/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "webgl"
version = "0.1.0"
authors = ["Miklós Tusz <mdtusz@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-agent/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "yew-agent"
version = "0.1.0"
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
edition = "2018"
edition = "2021"
readme = "../../README.md"
description = "Agents for Yew"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "yew-macro"
version = "0.19.3"
edition = "2018"
edition = "2021"
authors = ["Justin Starry <justin@yew.rs>"]
repository = "https://github.com/yewstack/yew"
homepage = "https://github.com/yewstack/yew"
Expand Down
12 changes: 6 additions & 6 deletions packages/yew-macro/src/derive_props/builder.rs
Expand Up @@ -65,19 +65,19 @@ impl ToTokens for PropsBuilder<'_> {
#(impl #step_trait for #step_names {})*

#[doc(hidden)]
#vis struct #builder_name#step_generics
#vis struct #builder_name #step_generics
#where_clause
{
wrapped: ::std::boxed::Box<#wrapper_name#ty_generics>,
wrapped: ::std::boxed::Box<#wrapper_name #ty_generics>,
_marker: ::std::marker::PhantomData<#step_generic_param>,
}

#impl_steps

impl#impl_generics #builder_name<#generic_args> #where_clause {
impl #impl_generics #builder_name<#generic_args> #where_clause {
#[doc(hidden)]
#vis fn build(self) -> #props_name#ty_generics {
#props_name#turbofish_generics {
#vis fn build(self) -> #props_name #ty_generics {
#props_name #turbofish_generics {
#(#set_fields)*
}
}
Expand Down Expand Up @@ -190,7 +190,7 @@ impl PropsBuilder<'_> {

token_stream.extend(quote! {
#( #extra_attrs )*
impl#impl_generics #builder_name<#current_step_arguments> #where_clause {
impl #impl_generics #builder_name<#current_step_arguments> #where_clause {
#(#optional_prop_fn)*
#(#required_prop_fn)*
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/derive_props/mod.rs
Expand Up @@ -105,7 +105,7 @@ impl ToTokens for DerivePropsInput {
// The properties trait has a `builder` method which creates the props builder
let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
let properties = quote! {
impl#impl_generics ::yew::html::Properties for #props_name#ty_generics #where_clause {
impl #impl_generics ::yew::html::Properties for #props_name #ty_generics #where_clause {
type Builder = #builder_name<#builder_generic_args>;

fn builder() -> Self::Builder {
Expand Down
6 changes: 3 additions & 3 deletions packages/yew-macro/src/derive_props/wrapper.rs
Expand Up @@ -27,15 +27,15 @@ impl ToTokens for PropsWrapper<'_> {

let wrapper = quote! {
#(#extra_attrs)*
struct #wrapper_name#generics
struct #wrapper_name #generics
#where_clause
{
#(#wrapper_field_defs)*
}

impl#impl_generics ::std::default::Default for #wrapper_name#ty_generics #where_clause {
impl #impl_generics ::std::default::Default for #wrapper_name #ty_generics #where_clause {
fn default() -> Self {
#wrapper_name#turbofish_generics {
#wrapper_name #turbofish_generics {
#(#wrapper_default_setters)*
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/yew-macro/src/html_tree/html_dashed_name.rs
Expand Up @@ -88,8 +88,8 @@ impl ToTokens for HtmlDashedName {
let HtmlDashedName { name, extended } = self;
let dashes = extended.iter().map(|(dash, _)| quote! {#dash});
let idents = extended.iter().map(|(_, ident)| quote! {#ident});
let extended = quote! { #(#dashes#idents)* };
tokens.extend(quote! { #name#extended });
let extended = quote! { #(#dashes #idents)* };
tokens.extend(quote! { #name #extended });
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/html_tree/html_element.rs
Expand Up @@ -498,7 +498,7 @@ impl Parse for DynamicName {
impl ToTokens for DynamicName {
fn to_tokens(&self, tokens: &mut TokenStream) {
let Self { at, expr } = self;
tokens.extend(quote! {#at#expr});
tokens.extend(quote! {#at #expr});
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/html_tree/html_list.rs
Expand Up @@ -72,7 +72,7 @@ impl ToTokens for HtmlList {
let spanned = {
let open = open.to_spanned();
let close = close.to_spanned();
quote! { #open#close }
quote! { #open #close }
};

tokens.extend(quote_spanned! {spanned.span()=>
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-macro/src/html_tree/tag.rs
Expand Up @@ -145,6 +145,6 @@ impl TagTokens {
/// This is to work around the limitation of being unable to manually join spans on stable.
pub fn to_spanned(&self) -> impl ToTokens {
let Self { lt, gt, .. } = self;
quote! {#lt#gt}
quote! {#lt #gt}
}
}
2 changes: 1 addition & 1 deletion packages/yew-macro/src/props/component.rs
Expand Up @@ -30,7 +30,7 @@ impl Parse for BaseExpr {
impl ToTokens for BaseExpr {
fn to_tokens(&self, tokens: &mut TokenStream) {
let BaseExpr { dot2, expr } = self;
tokens.extend(quote! { #dot2#expr });
tokens.extend(quote! { #dot2 #expr });
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router-macro/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "yew-router-macro"
version = "0.16.0"
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Contains macros used with yew-router"
repository = "https://github.com/yewstack/yew"
Expand Down
2 changes: 1 addition & 1 deletion packages/yew-router/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "yew-router"
version = "0.16.0"
authors = ["Hamza <muhammadhamza1311@gmail.com>"]
edition = "2018"
edition = "2021"
license = "MIT OR Apache-2.0"
readme = "README.md"
keywords = ["web", "yew", "router"]
Expand Down
2 changes: 1 addition & 1 deletion packages/yew/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "yew"
version = "0.19.3"
edition = "2018"
edition = "2021"
authors = [
"Denis Kolodin <deniskolodin@gmail.com>",
"Justin Starry <justin@yew.rs>",
Expand Down
2 changes: 1 addition & 1 deletion tools/changelog/Cargo.toml
Expand Up @@ -2,7 +2,7 @@
name = "changelog"
version = "0.1.0"
authors = ["Cecile Tonglet <cecile.tonglet@cecton.com>"]
edition = "2018"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

Expand Down