chore: cargo clippy --fix. (#1136)
This commit is contained in:
parent
4e41fad107
commit
f6d856ee11
|
@ -204,12 +204,8 @@ pub fn handle_server_fns_with_context(
|
|||
.headers()
|
||||
.get("Content-Type")
|
||||
.and_then(|value| value.to_str().ok())
|
||||
.and_then(|value| {
|
||||
Some(
|
||||
value.starts_with(
|
||||
"multipart/form-data; boundary=",
|
||||
),
|
||||
)
|
||||
.map(|value| {
|
||||
value.starts_with("multipart/form-data; boundary=")
|
||||
})
|
||||
== Some(true)
|
||||
{
|
||||
|
|
|
@ -73,7 +73,7 @@ impl LNode {
|
|||
LNode::parse_node(child, &mut children)?;
|
||||
}
|
||||
views.push(LNode::Component {
|
||||
name: name,
|
||||
name,
|
||||
props: el
|
||||
.open_tag
|
||||
.attributes
|
||||
|
|
|
@ -20,7 +20,7 @@ pub fn block_to_primitive_expression(block: &syn::Block) -> Option<&syn::Expr> {
|
|||
return None;
|
||||
}
|
||||
match &block.stmts[0] {
|
||||
syn::Stmt::Expr(e, None) => return Some(&e),
|
||||
syn::Stmt::Expr(e, None) => return Some(e),
|
||||
_ => {}
|
||||
}
|
||||
None
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
use criterion::{criterion_group, criterion_main, Criterion};
|
||||
|
||||
fn rs_fan_out(c: &mut Criterion) {
|
||||
use reactive_signals::{
|
||||
runtimes::ClientRuntime, signal, types::Func, Signal,
|
||||
};
|
||||
use reactive_signals::{runtimes::ClientRuntime, signal};
|
||||
|
||||
c.bench_function("rs_fan_out", |b| {
|
||||
b.iter(|| {
|
||||
|
|
|
@ -2,14 +2,11 @@ use criterion::{criterion_group, criterion_main, Criterion};
|
|||
use std::{cell::Cell, rc::Rc};
|
||||
|
||||
fn rs_narrow_down(c: &mut Criterion) {
|
||||
use reactive_signals::{
|
||||
runtimes::ClientRuntime, signal, types::Func, Signal,
|
||||
};
|
||||
use reactive_signals::{runtimes::ClientRuntime, signal};
|
||||
|
||||
c.bench_function("rs_narrow_down", |b| {
|
||||
b.iter(|| {
|
||||
let cx = ClientRuntime::bench_root_scope();
|
||||
let acc = Rc::new(Cell::new(0));
|
||||
let sigs =
|
||||
Rc::new((0..1000).map(|n| signal!(cx, n)).collect::<Vec<_>>());
|
||||
let memo = signal!(cx, {
|
||||
|
@ -28,11 +25,9 @@ fn l021_narrow_down(c: &mut Criterion) {
|
|||
let runtime = create_runtime();
|
||||
b.iter(|| {
|
||||
create_scope(runtime, |cx| {
|
||||
let acc = Rc::new(Cell::new(0));
|
||||
let sigs =
|
||||
(0..1000).map(|n| create_signal(cx, n)).collect::<Vec<_>>();
|
||||
let reads = sigs.iter().map(|(r, _)| *r).collect::<Vec<_>>();
|
||||
let writes = sigs.iter().map(|(_, w)| *w).collect::<Vec<_>>();
|
||||
let memo = create_memo(cx, move |_| {
|
||||
reads.iter().map(|r| r.get()).sum::<i32>()
|
||||
});
|
||||
|
@ -50,7 +45,6 @@ fn sycamore_narrow_down(c: &mut Criterion) {
|
|||
c.bench_function("sycamore_narrow_down", |b| {
|
||||
b.iter(|| {
|
||||
let d = create_scope(|cx| {
|
||||
let acc = Rc::new(Cell::new(0));
|
||||
let sigs = Rc::new(
|
||||
(0..1000).map(|n| create_signal(cx, n)).collect::<Vec<_>>(),
|
||||
);
|
||||
|
@ -72,11 +66,9 @@ fn leptos_narrow_down(c: &mut Criterion) {
|
|||
c.bench_function("leptos_narrow_down", |b| {
|
||||
b.iter(|| {
|
||||
create_scope(runtime, |cx| {
|
||||
let acc = Rc::new(Cell::new(0));
|
||||
let sigs =
|
||||
(0..1000).map(|n| create_signal(cx, n)).collect::<Vec<_>>();
|
||||
let reads = sigs.iter().map(|(r, _)| *r).collect::<Vec<_>>();
|
||||
let writes = sigs.iter().map(|(_, w)| *w).collect::<Vec<_>>();
|
||||
let memo = create_memo(cx, move |_| {
|
||||
reads.iter().map(|r| r.get()).sum::<i32>()
|
||||
});
|
||||
|
|
|
@ -37,7 +37,7 @@ impl GlobalSuspenseContext {
|
|||
|
||||
/// Runs a function with a reference to the underlying suspense context.
|
||||
pub fn with_inner<T>(&self, f: impl FnOnce(&SuspenseContext) -> T) -> T {
|
||||
f(&*self.0.borrow())
|
||||
f(&self.0.borrow())
|
||||
}
|
||||
|
||||
/// Runs a function with a reference to the underlying suspense context.
|
||||
|
|
|
@ -54,7 +54,6 @@ pub fn Outlet(cx: Scope) -> impl IntoView {
|
|||
let (current_view, set_current_view) = create_signal(cx, None);
|
||||
|
||||
create_effect(cx, {
|
||||
let global_suspense = global_suspense.clone();
|
||||
move |prev| {
|
||||
let outlet = outlet.get();
|
||||
let is_fallback =
|
||||
|
|
Loading…
Reference in New Issue