Skip to content

Commit ca2f403

Browse files
committed
refactor: rename Cargo::run method to Cargo::new for clarity
1 parent 84ea987 commit ca2f403

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/gh-workflow-tailcall/src/standard.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,14 @@ impl StandardWorkflow {
175175
]),
176176
)
177177
.add_step(
178-
Cargo::run("fmt")
178+
Cargo::new("fmt")
179179
.name("Cargo Fmt")
180180
.nightly()
181181
.add_args("--all")
182182
.add_args_when(!auto_fix, "--check"),
183183
)
184184
.add_step(
185-
Cargo::run("clippy")
185+
Cargo::new("clippy")
186186
.name("Cargo Clippy")
187187
.nightly()
188188
.add_args_when(auto_fix, "--fix")
@@ -205,19 +205,19 @@ impl StandardWorkflow {
205205
.add_step(Toolchain::default().add_stable())
206206
.add_step_when(
207207
matches!(self.test_runner, TestRunner::Nextest),
208-
Cargo::run("cargo install cargo-nextest --locked").name("Install nextest"),
208+
Cargo::new("cargo install cargo-nextest --locked").name("Install nextest"),
209209
)
210210
.add_step(match self.test_runner {
211-
TestRunner::Cargo => Cargo::run("test")
211+
TestRunner::Cargo => Cargo::new("test")
212212
.args("--all-features --workspace")
213213
.name("Cargo Test"),
214-
TestRunner::Nextest => Cargo::run("nextest")
214+
TestRunner::Nextest => Cargo::new("nextest")
215215
.args("run --all-features --workspace")
216216
.name("Cargo Nextest"),
217217
})
218218
.add_step_when(
219219
self.benchmarks,
220-
Cargo::run("bench").args("--workspace").name("Cargo Bench"),
220+
Cargo::new("bench").args("--workspace").name("Cargo Bench"),
221221
)
222222
}
223223

crates/gh-workflow/src/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct Cargo {
2525

2626
impl Cargo {
2727
/// Creates a new `Cargo` instance with the specified command.
28-
pub fn run<T: ToString>(cmd: T) -> Cargo {
28+
pub fn new<T: ToString>(cmd: T) -> Cargo {
2929
Cargo {
3030
command: cmd.to_string(),
3131
id: Default::default(),

0 commit comments

Comments
 (0)