Skip to content

Commit 323d1e1

Browse files
committed
remove unnecessary Result<()> return value from terminate function
1 parent 6c44b73 commit 323d1e1

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

plane/src/drone/backend_manager.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -259,11 +259,7 @@ impl BackendManager {
259259
}
260260
}
261261

262-
pub async fn terminate(
263-
self: &Arc<Self>,
264-
kind: TerminationKind,
265-
reason: TerminationReason,
266-
) -> Result<()> {
262+
pub async fn terminate(self: &Arc<Self>, kind: TerminationKind, reason: TerminationReason) {
267263
let state = self
268264
.state
269265
.lock()
@@ -276,8 +272,6 @@ impl BackendManager {
276272
TerminationKind::Hard => state.to_hard_terminating(reason),
277273
};
278274
self.set_state(new_state);
279-
280-
Ok(())
281275
}
282276

283277
pub fn mark_terminated(self: &Arc<Self>, exit_code: Option<i32>) -> Result<()> {

plane/src/drone/executor.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ impl Executor {
232232
manager.clone()
233233
};
234234

235-
manager.terminate(*kind, *reason).await?;
235+
manager.terminate(*kind, *reason).await;
236236
}
237237
}
238238

0 commit comments

Comments
 (0)