Skip to content

Commit 37e4a14

Browse files
style(clippy): fix vec_init_then_push, redundant_static_lifetimes, unused_variable (#734)
1 parent f8bfcf9 commit 37e4a14

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

src/compile/codemods/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ pub struct Codemod {
9999
/// having run first (e.g. A renames `foo` → `bar`, B operates on
100100
/// `bar`); idempotency means any codemod can re-run on any source
101101
/// without harm.
102-
pub static CODEMODS: &[&'static Codemod] = &[
102+
pub static CODEMODS: &[&Codemod] = &[
103103
&m0001_repos_unified::CODEMOD,
104104
&m0002_pool_object_form::CODEMOD,
105105
];

src/compile/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6536,7 +6536,7 @@ safe-outputs:
65366536
fn test_generate_awf_mounts_no_extensions() {
65376537
let fm = minimal_front_matter();
65386538
let exts = crate::compile::extensions::collect_extensions(&fm);
6539-
let ctx = crate::compile::extensions::CompileContext::for_test(&fm);
6539+
let _ctx = crate::compile::extensions::CompileContext::for_test(&fm);
65406540
let result = generate_awf_mounts(&exts);
65416541
assert_eq!(result, "\\", "no mounts should produce bare continuation");
65426542
}
@@ -6547,7 +6547,7 @@ safe-outputs:
65476547
parse_markdown("---\nname: test\ndescription: test\nruntimes:\n lean: true\n---\n")
65486548
.unwrap();
65496549
let exts = crate::compile::extensions::collect_extensions(&fm);
6550-
let ctx = crate::compile::extensions::CompileContext::for_test(&fm);
6550+
let _ctx = crate::compile::extensions::CompileContext::for_test(&fm);
65516551
let result = generate_awf_mounts(&exts);
65526552
assert!(result.contains("--mount"), "should contain --mount flag");
65536553
assert!(result.contains(".elan"), "should reference .elan directory");

src/compile/extensions/mod.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -677,12 +677,7 @@ extension_enum! {
677677
/// (runtimes in `RuntimesConfig` field order, tools in `ToolsConfig`
678678
/// field order).
679679
pub fn collect_extensions(front_matter: &FrontMatter) -> Vec<Extension> {
680-
let mut extensions = Vec::new();
681-
682680
// ── Always-on internal extensions ──
683-
extensions.push(Extension::AdoAwMarker(AdoAwMarkerExtension));
684-
extensions.push(Extension::GitHub(GitHubExtension));
685-
extensions.push(Extension::SafeOutputs(SafeOutputsExtension));
686681
// Always-on ado-script extension. Owns both the gate evaluator
687682
// (Setup job) and the runtime-import resolver (Agent job). Internal
688683
// gating on `filters:` and `inlined-imports` means the extension
@@ -692,11 +687,16 @@ pub fn collect_extensions(front_matter: &FrontMatter) -> Vec<Extension> {
692687
// resolver step run BEFORE any user-facing Runtime extension (e.g.
693688
// `NodeExtension`). The user's pinned Node version then "wins last"
694689
// on PATH for the rest of the Agent job.
695-
extensions.push(Extension::AdoScript(AdoScriptExtension {
696-
pr_filters: front_matter.pr_filters().cloned(),
697-
pipeline_filters: front_matter.pipeline_filters().cloned(),
698-
inlined_imports: front_matter.inlined_imports,
699-
}));
690+
let mut extensions = vec![
691+
Extension::AdoAwMarker(AdoAwMarkerExtension),
692+
Extension::GitHub(GitHubExtension),
693+
Extension::SafeOutputs(SafeOutputsExtension),
694+
Extension::AdoScript(AdoScriptExtension {
695+
pr_filters: front_matter.pr_filters().cloned(),
696+
pipeline_filters: front_matter.pipeline_filters().cloned(),
697+
inlined_imports: front_matter.inlined_imports,
698+
}),
699+
];
700700

701701
// ── Runtimes (ExtensionPhase::Runtime) ──
702702
if let Some(lean) = front_matter.runtimes.as_ref().and_then(|r| r.lean.as_ref())

0 commit comments

Comments
 (0)