Skip to content

Commit fbbfb6d

Browse files
committed
Change method name
Change method name from ExitStatus::to_str() to ExitStatus::as_str(). This fixes a clippy warning.
1 parent a30ff9f commit fbbfb6d

File tree

1 file changed

+3
-3
lines changed
  • surface-dtx-daemon/src/logic

1 file changed

+3
-3
lines changed

surface-dtx-daemon/src/logic/proc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ enum ExitStatus {
2424
}
2525

2626
impl ExitStatus {
27-
fn to_str(&self) -> &'static str {
27+
fn as_str(&self) -> &'static str {
2828
match self {
2929
Self::Commence => "0",
3030
Self::Abort => "1",
@@ -93,8 +93,8 @@ impl Adapter for ProcessAdapter {
9393
// run handler
9494
let output = Command::new(path)
9595
.current_dir(dir)
96-
.env("EXIT_DETACH_COMMENCE", ExitStatus::Commence.to_str())
97-
.env("EXIT_DETACH_ABORT", ExitStatus::Abort.to_str())
96+
.env("EXIT_DETACH_COMMENCE", ExitStatus::Commence.as_str())
97+
.env("EXIT_DETACH_ABORT", ExitStatus::Abort.as_str())
9898
.kill_on_drop(true)
9999
.output().await
100100
.context("Subprocess error (detachment)")?;

0 commit comments

Comments
 (0)