chore: clippy - simplified conditional logic in transition.rs. (#615)
This commit is contained in:
parent
2ee323135f
commit
2dd9116a20
|
@ -119,9 +119,7 @@ where
|
|||
if is_first_run(&first_run, &suspense_context) {
|
||||
let has_local_only = suspense_context.has_local_only();
|
||||
*prev_children.borrow_mut() = Some(frag.nodes.clone());
|
||||
if (has_local_only && child_runs.get() > 0)
|
||||
|| !has_local_only
|
||||
{
|
||||
if !has_local_only || child_runs.get() > 0 {
|
||||
first_run.set(false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ fn has_scheme(path: &str) -> bool {
|
|||
#[doc(hidden)]
|
||||
fn normalize(path: &str, omit_slash: bool) -> Cow<'_, str> {
|
||||
let s = path.trim_start_matches('/').trim_end_matches('/');
|
||||
if s.is_empty() || omit_slash || begins_with_query_or_hash(&s) {
|
||||
if s.is_empty() || omit_slash || begins_with_query_or_hash(s) {
|
||||
s.into()
|
||||
} else {
|
||||
format!("/{s}").into()
|
||||
|
|
Loading…
Reference in New Issue