This is an automated email from the ASF dual-hosted git repository.

nju_yaho pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-ballista.git


The following commit(s) were added to refs/heads/main by this push:
     new ac418de3 Fix cargo clippy for latest rust version (#848)
ac418de3 is described below

commit ac418de36a1928c7f1d7e743c04e1209aac33fa1
Author: yahoNanJing <[email protected]>
AuthorDate: Mon Jul 17 20:47:29 2023 +0800

    Fix cargo clippy for latest rust version (#848)
    
    Co-authored-by: yangzhong <[email protected]>
---
 ballista/cache/src/backend/policy/lru/mod.rs        | 4 ++--
 ballista/scheduler/src/cluster/memory.rs            | 2 +-
 ballista/scheduler/src/cluster/mod.rs               | 2 +-
 ballista/scheduler/src/state/execution_graph_dot.rs | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/ballista/cache/src/backend/policy/lru/mod.rs 
b/ballista/cache/src/backend/policy/lru/mod.rs
index 24d53a7d..a63e5d04 100644
--- a/ballista/cache/src/backend/policy/lru/mod.rs
+++ b/ballista/cache/src/backend/policy/lru/mod.rs
@@ -83,8 +83,8 @@ where
         Self {
             max_num: capacity,
             current_num: 0,
-            _key_marker: PhantomData::default(),
-            _value_marker: PhantomData::default(),
+            _key_marker: PhantomData,
+            _value_marker: PhantomData,
         }
     }
 }
diff --git a/ballista/scheduler/src/cluster/memory.rs 
b/ballista/scheduler/src/cluster/memory.rs
index 6060e79c..b9dcef40 100644
--- a/ballista/scheduler/src/cluster/memory.rs
+++ b/ballista/scheduler/src/cluster/memory.rs
@@ -98,7 +98,7 @@ impl ClusterState for InMemoryClusterState {
         let mut guard = self.task_slots.lock().await;
 
         for (executor_id, num_slots) in increments {
-            if let Some(mut data) = guard.get_mut(&executor_id) {
+            if let Some(data) = guard.get_mut(&executor_id) {
                 data.slots += num_slots;
             }
         }
diff --git a/ballista/scheduler/src/cluster/mod.rs 
b/ballista/scheduler/src/cluster/mod.rs
index 87680ac0..c3011184 100644
--- a/ballista/scheduler/src/cluster/mod.rs
+++ b/ballista/scheduler/src/cluster/mod.rs
@@ -513,7 +513,7 @@ pub(crate) async fn bind_task_round_robin(
                 }
                 // Since the slots is a vector with descending order, and the 
total available slots is larger than 0,
                 // we are sure the available slot number at idx_slot is larger 
than 1
-                let mut slot = &mut slots[idx_slot];
+                let slot = &mut slots[idx_slot];
                 let executor_id = slot.executor_id.clone();
                 let task_id = *task_id_gen;
                 *task_id_gen += 1;
diff --git a/ballista/scheduler/src/state/execution_graph_dot.rs 
b/ballista/scheduler/src/state/execution_graph_dot.rs
index ce672f26..028c0bd2 100644
--- a/ballista/scheduler/src/state/execution_graph_dot.rs
+++ b/ballista/scheduler/src/state/execution_graph_dot.rs
@@ -69,7 +69,7 @@ impl<'a> ExecutionGraphDot<'a> {
             writeln!(&mut dot, "}}")?;
             Ok(dot)
         } else {
-            Err(fmt::Error::default())
+            Err(fmt::Error)
         }
     }
 

Reply via email to