Skip to content

Commit ec79000

Browse files
authored
fix: satisfy clippy 1.97 useless_borrows_in_formatting (#1978)
1 parent 647cefe commit ec79000

8 files changed

Lines changed: 18 additions & 18 deletions

File tree

ballista-cli/src/tui/ui/main/jobs/stage_tasks_popup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub(crate) fn render_stage_tasks_popup(f: &mut Frame, app: &App) {
7777
Block::default()
7878
.title(format!(
7979
" Tasks for stage '{}' of job '{}' ",
80-
stage.id, &popup.job_id
80+
stage.id, popup.job_id
8181
))
8282
.borders(Borders::ALL)
8383
.border_style(app.theme.popup_border_alt)

ballista/client/src/extension.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl Extension {
169169
"hostname should be provided".to_string(),
170170
))?;
171171
let port = url.port().unwrap_or(DEFAULT_SCHEDULER_PORT);
172-
let scheduler_url = format!("http://{}:{}", &host, port);
172+
let scheduler_url = format!("http://{}:{}", host, port);
173173

174174
Ok(scheduler_url)
175175
}

ballista/core/src/object_store.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ impl ObjectStoreRegistry for CustomObjectStoreRegistry {
145145

146146
fn get_store(&self, url: &Url) -> Result<Arc<dyn ObjectStore>> {
147147
let scheme = url.scheme();
148-
log::trace!("get_store: {:?}", &self.s3options.config.read());
148+
log::trace!("get_store: {:?}", self.s3options.config.read());
149149
match scheme {
150150
"" | "file" => Ok(self.local.clone()),
151151
"http" | "https" => Ok(Arc::new(

ballista/executor/src/executor_process.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ async fn clean_all_shuffle_data(work_dir: &str) -> ballista_core::error::Result<
728728
}
729729
}
730730

731-
info!("The work_dir {:?} will be deleted", &to_deleted);
731+
info!("The work_dir {:?} will be deleted", to_deleted);
732732
for del in to_deleted {
733733
if let Err(e) = fs::remove_dir_all(&del).await {
734734
error!("Fail to remove the directory {del:?} due to {e}");

ballista/executor/src/executor_server.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -778,14 +778,14 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> TaskRunnerPool<T,
778778
if let Some(curator_task) = maybe_task {
779779
let task_identity = format!(
780780
"TID {} {}/{}.{}/{}.{}",
781-
&curator_task.task.task_id,
782-
&curator_task.task.job_id,
783-
&curator_task.task.stage_id,
784-
&curator_task.task.stage_attempt_num,
785-
&curator_task.task.partition_id,
786-
&curator_task.task.task_attempt_num,
781+
curator_task.task.task_id,
782+
curator_task.task.job_id,
783+
curator_task.task.stage_id,
784+
curator_task.task.stage_attempt_num,
785+
curator_task.task.partition_id,
786+
curator_task.task.task_attempt_num,
787787
);
788-
debug!("Received task {:?}", &task_identity);
788+
debug!("Received task {:?}", task_identity);
789789

790790
let server = executor_server.clone();
791791
dedicated_executor.spawn(async move {

ballista/scheduler/src/scheduler_server/grpc.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerGrpc
117117
.map_err(|e| {
118118
let msg = format!(
119119
"Fail to update tasks status from executor {:?} due to {:?}",
120-
&executor_id, e
120+
executor_id, e
121121
);
122122
error!("{msg}");
123123
Status::internal(msg)
@@ -326,7 +326,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan> SchedulerGrpc
326326
.map_err(|e| {
327327
let msg = format!(
328328
"Fail to update tasks status from executor {:?} due to {:?}",
329-
&executor_id, e
329+
executor_id, e
330330
);
331331
error!("{msg}");
332332
Status::internal(msg)

ballista/scheduler/src/scheduler_server/query_stage_scheduler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl<T: 'static + AsLogicalPlan, U: 'static + AsExecutionPlan>
146146
}
147147
}
148148

149-
error!("{}", &fail_message);
149+
error!("{}", fail_message);
150150
QueryStageSchedulerEvent::JobPlanningFailed {
151151
job_id,
152152
fail_message,

benchmarks/src/bin/tpch.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ async fn loadtest_ballista(opt: BallistaLoadtestOpt) -> Result<()> {
614614
.split(',')
615615
.map(|s| s.parse().unwrap())
616616
.collect();
617-
println!("query list: {:?} ", &query_list);
617+
println!("query list: {:?} ", query_list);
618618

619619
let total = Instant::now();
620620
let mut futures = vec![];
@@ -636,7 +636,7 @@ async fn loadtest_ballista(opt: BallistaLoadtestOpt) -> Result<()> {
636636
.unwrap();
637637
println!(
638638
"Client {} Round {} Query {} started",
639-
&client_id, &i, query_id
639+
client_id, i, query_id
640640
);
641641
let start = Instant::now();
642642
let df = client
@@ -652,7 +652,7 @@ async fn loadtest_ballista(opt: BallistaLoadtestOpt) -> Result<()> {
652652
let elapsed = start.elapsed().as_secs_f64() * 1000.0;
653653
println!(
654654
"Client {} Round {} Query {} took {:.1} ms ",
655-
&client_id, &i, query_id, elapsed
655+
client_id, i, query_id, elapsed
656656
);
657657
if opt.debug && !batches.is_empty() {
658658
pretty::print_batches(&batches).unwrap();
@@ -945,7 +945,7 @@ async fn convert_tbl(opt: ConvertOpt) -> Result<()> {
945945

946946
println!(
947947
"Converting '{}' to {} files in directory '{}'",
948-
&input_path, &opt.file_format, &output_path
948+
input_path, opt.file_format, output_path
949949
);
950950
match opt.file_format.as_str() {
951951
"csv" => ctx.write_csv(csv, output_path).await?,

0 commit comments

Comments
 (0)