Skip to content

Commit b78573c

Browse files
committed
Clippy fixes
1 parent 6e60111 commit b78573c

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

core/src/worker/activities.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ impl WorkerActivityTasks {
352352
aer::Status::Failed(ar::Failure { failure }) => {
353353
act_metrics.act_execution_failed();
354354
client
355-
.fail_activity_task(task_token.clone(), failure.map(Into::into))
355+
.fail_activity_task(task_token.clone(), failure)
356356
.await
357357
.err()
358358
}
@@ -387,7 +387,7 @@ impl WorkerActivityTasks {
387387
None
388388
};
389389
client
390-
.cancel_activity_task(task_token.clone(), details.map(Into::into))
390+
.cancel_activity_task(task_token.clone(), details)
391391
.await
392392
.err()
393393
}

core/src/worker/workflow/machines/activity_state_machine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ fn new_cancel_failure(dat: &SharedState, attrs: ActivityTaskCanceledEventAttribu
750750
message: "Activity cancelled".to_string(),
751751
cause: Some(Box::from(Failure {
752752
failure_info: Some(FailureInfo::CanceledFailureInfo(CanceledFailureInfo {
753-
details: attrs.details.map(Into::into),
753+
details: attrs.details,
754754
})),
755755
..Default::default()
756756
})),

core/src/worker/workflow/machines/workflow_machines.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1029,7 +1029,7 @@ impl WorkflowMachines {
10291029
}
10301030

10311031
fn set_current_time(&mut self, time: SystemTime) -> SystemTime {
1032-
if self.current_wf_time.map_or(true, |t| t < time) {
1032+
if self.current_wf_time.is_none_or(|t| t < time) {
10331033
self.current_wf_time = Some(time);
10341034
}
10351035
self.current_wf_time

core/src/worker/workflow/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ impl Workflows {
429429
warn!(run_id=%run_id, failure=?failure, "Failing workflow task");
430430
self.handle_wft_reporting_errs(&run_id, || async {
431431
self.client
432-
.fail_workflow_task(tt, cause, failure.failure.map(Into::into))
432+
.fail_workflow_task(tt, cause, failure.failure)
433433
.await
434434
})
435435
.await;

sdk-core-protos/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ pub mod coresdk {
12631263
schedule_to_close_timeout: r.schedule_to_close_timeout,
12641264
start_to_close_timeout: r.start_to_close_timeout,
12651265
heartbeat_timeout: r.heartbeat_timeout,
1266-
retry_policy: r.retry_policy.map(Into::into),
1266+
retry_policy: r.retry_policy,
12671267
is_local: false,
12681268
},
12691269
)),
@@ -1424,7 +1424,7 @@ pub mod coresdk {
14241424
fn from_payloads(p: Option<Payloads>) -> Self {
14251425
match p {
14261426
None => std::iter::empty().collect(),
1427-
Some(p) => p.payloads.into_iter().map(Into::into).collect(),
1427+
Some(p) => p.payloads.into_iter().collect(),
14281428
}
14291429
}
14301430
}
@@ -1442,7 +1442,7 @@ pub mod coresdk {
14421442
None
14431443
} else {
14441444
Some(Payloads {
1445-
payloads: iterd.map(Into::into).collect(),
1445+
payloads: iterd.collect(),
14461446
})
14471447
}
14481448
}

0 commit comments

Comments
 (0)