clippy: less .clone() calls, simpler pointer passing. (#707)

This commit is contained in:
martin frances 2023-03-19 19:30:12 +00:00 committed by GitHub
parent 71ee4cd09d
commit ddd463748d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 10 deletions

View file

@ -322,7 +322,7 @@ impl Element {
cx,
element,
attrs,
children: children.clone(),
children,
#[cfg(debug_assertions)]
view_marker,
}

View file

@ -126,10 +126,7 @@ pub fn render_to_stream_in_order_with_prefix_undisposed_with_context(
}
#[async_recursion(?Send)]
async fn handle_chunks(
mut tx: UnboundedSender<String>,
chunks: Vec<StreamChunk>,
) {
async fn handle_chunks(tx: UnboundedSender<String>, chunks: Vec<StreamChunk>) {
let mut buffer = String::new();
for chunk in chunks {
match chunk {

View file

@ -186,12 +186,12 @@ impl Runtime {
let current_observer = self.observer.get();
// mark self dirty
if let Some(mut current_node) = nodes.get_mut(node) {
if let Some(current_node) = nodes.get_mut(node) {
Runtime::mark(
node,
&mut current_node,
current_node,
ReactiveNodeState::Dirty,
&mut *pending_effects,
&mut pending_effects,
current_observer,
);
@ -200,10 +200,10 @@ impl Runtime {
let mut descendants = Default::default();
Runtime::gather_descendants(&subscribers, node, &mut descendants);
for descendant in descendants {
if let Some(mut node) = nodes.get_mut(descendant) {
if let Some(node) = nodes.get_mut(descendant) {
Runtime::mark(
descendant,
&mut node,
node,
ReactiveNodeState::Check,
&mut pending_effects,
current_observer,