actually make clippy happy

This commit is contained in:
Adrian Wannenmacher committed 2023-04-12 20:19:01 +02:00
1 parent 2f3bb4d6d5
commit 90c7e22f8b
9 files changed
+47 -47

No files matched your search

+7 -7
View File
@@ -20,7 +20,7 @@ pub struct Client {
type ClientContext = Arc<Mutex<Vec<Client>>>;
fn App(cx: Scope) -> Element {
use_router(cx, &|| RouterConfiguration::default(), &|| {
use_router(cx, &RouterConfiguration::default, &|| {
Segment::content(comp(ClientList))
.fixed(
"new",
@@ -32,7 +32,7 @@ fn App(cx: Scope) -> Element {
)
});
use_context_provider::<ClientContext>(&cx, Default::default);
use_context_provider::<ClientContext>(cx, Default::default);
render! {
link {
@@ -86,11 +86,11 @@ fn ClientList(cx: Scope) -> Element {
struct ClientAddName;
fn ClientAdd(cx: Scope) -> Element {
let clients = use_context::<ClientContext>(cx).unwrap();
let first_name = use_state(&cx, String::new);
let last_name = use_state(&cx, String::new);
let description = use_state(&cx, String::new);
let first_name = use_state(cx, String::new);
let last_name = use_state(cx, String::new);
let description = use_state(cx, String::new);
let navigator = use_navigate(&cx).unwrap();
let navigator = use_navigate(cx).unwrap();
cx.render(rsx! {
h2 { "Add new Client" }
@@ -178,7 +178,7 @@ fn ClientAdd(cx: Scope) -> Element {
struct SettingsName;
fn Settings(cx: Scope) -> Element {
let clients = use_context::<ClientContext>(&cx).unwrap();
let clients = use_context::<ClientContext>(cx).unwrap();
cx.render(rsx! {
h2 { "Settings" }
+1 -1
View File
@@ -17,7 +17,7 @@ fn main() {
}
fn app(cx: Scope) -> Element {
use_router(cx, &|| RouterConfiguration::default(), &|| {
use_router(cx, &RouterConfiguration::default, &|| {
Segment::content(comp(Home))
.fixed("games", comp(Games))
.fixed("play", comp(Play))
+1 -1
View File
@@ -8,7 +8,7 @@ fn main() {
}
fn app(cx: Scope) -> Element {
use_router(cx, &|| RouterConfiguration::default(), &|| {
use_router(cx, &RouterConfiguration::default, &|| {
Segment::content(comp(Home)).fixed("settings", comp(Settings))
});
+2 -2
View File
@@ -8,7 +8,7 @@ fn main() {
}
fn app(cx: Scope) -> Element {
use_router(cx, &|| RouterConfiguration::default(), &|| {
use_router(cx, &RouterConfiguration::default, &|| {
Segment::content(comp(Home))
.fixed(
"users",
@@ -79,7 +79,7 @@ fn User(cx: Scope) -> Element {
let user = state.parameter::<UserId>().unwrap();
let query = state.query.as_ref().map(|q| q.clone()).unwrap_or_default();
let query = state.query.as_ref().cloned().unwrap_or_default();
let bold = query.contains("bold") && !query.contains("bold=false");
cx.render(rsx! {
+1 -1
View File
@@ -14,7 +14,7 @@ fn main() {
}
fn app(cx: Scope) -> Element {
use_router(cx, &|| RouterConfiguration::default(), &|| {
use_router(cx, &RouterConfiguration::default, &|| {
Segment::content(comp(Home))
.fixed(
"blog",