Skip to content

Commit

Permalink
Update version to v0.6.1 (#67)
Browse files Browse the repository at this point in the history
* Update version to v0.6.1.

* Fix clippy.
  • Loading branch information
futursolo authored Jan 27, 2023
1 parent f3d3950 commit 41b251d
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion crates/bounce-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bounce-macros"
version = "0.6.0"
version = "0.6.1"
edition = "2021"
repository = "https://github.com/bounce-rs/bounce"
authors = [
Expand Down
4 changes: 2 additions & 2 deletions crates/bounce/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bounce"
version = "0.6.0"
version = "0.6.1"
edition = "2021"
repository = "https://github.com/bounce-rs/bounce"
authors = [
Expand All @@ -19,7 +19,7 @@ anymap2 = "0.13.0"
once_cell = "1.16.0"
wasm-bindgen = "0.2.83"
yew = "0.20"
bounce-macros = { path = "../bounce-macros", version = "0.6.0" }
bounce-macros = { path = "../bounce-macros", version = "0.6.1" }
futures = "0.3.25"

async-trait = { version = "0.1.59", optional = true }
Expand Down
6 changes: 3 additions & 3 deletions crates/bounce/src/helmet/ssr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,17 +145,17 @@ impl HelmetTag {
pub fn write_static(&self, w: &mut dyn Write) -> fmt::Result {
match self {
Self::Title(m) => {
write!(w, "<title>{}</title>", m)
write!(w, "<title>{m}</title>")
}
Self::Script { content, attrs, .. } => {
write!(w, "<script ")?;
Self::write_attrs_from(w, attrs, true)?;
write!(w, ">{}</script>", content)
write!(w, ">{content}</script>")
}
Self::Style { content, attrs } => {
write!(w, "<style ")?;
Self::write_attrs_from(w, attrs, true)?;
write!(w, ">{}</style>", content)
write!(w, ">{content}</style>")
}
Self::Body { .. } => Ok(()),
Self::Html { .. } => Ok(()),
Expand Down
2 changes: 1 addition & 1 deletion crates/bounce/src/helmet/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ fn merge_attrs(
match name.as_ref() {
"class" => match target.get("class").cloned() {
Some(m) => {
target.insert(name.clone(), Arc::<str>::from(format!("{} {}", value, m)));
target.insert(name.clone(), Arc::<str>::from(format!("{value} {m}")));
}
None => {
target.insert(name.clone(), value.clone());
Expand Down
6 changes: 3 additions & 3 deletions examples/helmet-ssr/src/bin/helmet-ssr-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ mod target_non_wasm32 {
if html_s.is_empty() {
let _ = writeln!(s, "<html>");
} else {
let _ = writeln!(s, "<html {}>", html_s);
let _ = writeln!(s, "<html {html_s}>");
}
}
let _ = writeln!(s, "<head>");
s.push_str(&helmet_s);
let _ = writeln!(s, r#"<script type="module">{}</script>"#, script_content);
let _ = writeln!(s, r#"<script type="module">{script_content}</script>"#);
let _ = writeln!(s, "</head>");

{
Expand All @@ -78,7 +78,7 @@ mod target_non_wasm32 {
if body_s.is_empty() {
let _ = writeln!(s, "<body>");
} else {
let _ = writeln!(s, "<body {}>", body_s);
let _ = writeln!(s, "<body {body_s}>");
}
}
s.push_str(&body_s);
Expand Down
2 changes: 1 addition & 1 deletion examples/helmet-ssr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fn render_fn(route: Route) -> Html {
}

fn format_title(s: AttrValue) -> AttrValue {
format!("{} - Example", s).into()
format!("{s} - Example").into()
}

#[function_component(App)]
Expand Down
2 changes: 1 addition & 1 deletion examples/helmet-title/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ fn render_fn(route: Route) -> Html {
}

fn format_title(s: AttrValue) -> AttrValue {
format!("{} - Example", s).into()
format!("{s} - Example").into()
}

#[function_component(App)]
Expand Down
14 changes: 7 additions & 7 deletions examples/notion/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ fn comp_a() -> Html {
html! {
<div>
<p id="val-a-a">{"Slice A: "}{a.0}</p>
<p id="val-a-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-a-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -140,7 +140,7 @@ fn comp_b() -> Html {
html! {
<div>
<p id="val-b-b">{"Slice B: "}{b.0}</p>
<p id="val-b-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-b-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -162,7 +162,7 @@ fn comp_c() -> Html {
html! {
<div>
<p id="val-c-c">{"Slice C: "}{c.0}</p>
<p id="val-c-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-c-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -186,7 +186,7 @@ fn comp_ab() -> Html {
<div>
<p id="val-ab-a">{"Slice A: "}{a.0}</p>
<p id="val-ab-b">{"Slice B: "}{b.0}</p>
<p id="val-ab-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-ab-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -210,7 +210,7 @@ fn comp_ac() -> Html {
<div>
<p id="val-ac-a">{"Slice A: "}{a.0}</p>
<p id="val-ac-c">{"Slice C: "}{c.0}</p>
<p id="val-ac-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-ac-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -234,7 +234,7 @@ fn comp_bc() -> Html {
<div>
<p id="val-bc-b">{"Slice B: "}{b.0}</p>
<p id="val-bc-c">{"Slice C: "}{c.0}</p>
<p id="val-bc-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-bc-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand Down Expand Up @@ -263,7 +263,7 @@ fn comp_abc() -> Html {
<p id="val-abc-a">{"Slice A: "}{a.0}</p>
<p id="val-abc-b">{"Slice B: "}{b.0}</p>
<p id="val-abc-c">{"Slice C: "}{c.0}</p>
<p id="val-abc-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-abc-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand Down
14 changes: 7 additions & 7 deletions examples/partial-render/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn comp_a() -> Html {
html! {
<div>
<p id="val-a-a">{"Slice A: "}{a.0}</p>
<p id="val-a-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-a-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -89,7 +89,7 @@ fn comp_b() -> Html {
html! {
<div>
<p id="val-b-b">{"Slice B: "}{b.0}</p>
<p id="val-b-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-b-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -111,7 +111,7 @@ fn comp_c() -> Html {
html! {
<div>
<p id="val-c-c">{"Slice C: "}{c.0}</p>
<p id="val-c-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-c-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -135,7 +135,7 @@ fn comp_ab() -> Html {
<div>
<p id="val-ab-a">{"Slice A: "}{a.0}</p>
<p id="val-ab-b">{"Slice B: "}{b.0}</p>
<p id="val-ab-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-ab-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -159,7 +159,7 @@ fn comp_ac() -> Html {
<div>
<p id="val-ac-a">{"Slice A: "}{a.0}</p>
<p id="val-ac-c">{"Slice C: "}{c.0}</p>
<p id="val-ac-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-ac-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand All @@ -183,7 +183,7 @@ fn comp_bc() -> Html {
<div>
<p id="val-bc-b">{"Slice B: "}{b.0}</p>
<p id="val-bc-c">{"Slice C: "}{c.0}</p>
<p id="val-bc-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-bc-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand Down Expand Up @@ -212,7 +212,7 @@ fn comp_abc() -> Html {
<p id="val-abc-a">{"Slice A: "}{a.0}</p>
<p id="val-abc-b">{"Slice B: "}{b.0}</p>
<p id="val-abc-c">{"Slice C: "}{c.0}</p>
<p id="val-abc-render-ctr">{format!("Rendered: {} Time(s)", ctr)}</p>
<p id="val-abc-render-ctr">{format!("Rendered: {ctr} Time(s)")}</p>
</div>
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/queries-ssr/src/bin/queries-ssr-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ mod target_non_wasm32 {
let _ = writeln!(s, "<html>");
let _ = writeln!(s, "<head>");

let _ = writeln!(s, r#"<script type="module">{}</script>"#, script_content);
let _ = writeln!(s, r#"<script type="module">{script_content}</script>"#);
let _ = writeln!(s, "</head>");

let _ = writeln!(s, "<body>");
Expand Down
2 changes: 1 addition & 1 deletion examples/random-uuid/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ fn reader() -> Html {
"Please click on Fetch to fetch a random UUID from remote.".to_string()
}
UuidState::Pending => "Loading UUID, Please wait...".to_string(),
UuidState::Complete(ref m) => format!("Random UUID: {}", m),
UuidState::Complete(ref m) => format!("Random UUID: {m}"),
};

html! { <div>{text}</div> }
Expand Down

0 comments on commit 41b251d

Please sign in to comment.