chore: clippy - simplified conditional logic in transition.rs. (#615)

This commit is contained in:
martin frances 2023-03-03 14:06:56 +00:00 committed by GitHub
parent 2ee323135f
commit 2dd9116a20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 4 deletions

View File

@ -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);
}
}

View File

@ -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()