Skip to content

Commit 4f9eb80

Browse files
committed
ci(workflow): replace rust setup
1 parent 34f36fa commit 4f9eb80

File tree

5 files changed

+9
-4
lines changed

5 files changed

+9
-4
lines changed

.github/workflows/ci_main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
with:
2828
node-version: "18"
2929
cache: "npm"
30-
- uses: actions-rs/toolchain@v1
30+
31+
- uses: actions-rust-lang/setup-rust-toolchain@v1
3132
with:
32-
profile: minimal
3333
components: llvm-tools-preview
3434
- name: Install cargo-llvm-cov
3535
uses: taiki-e/install-action@cargo-llvm-cov

packages/swc-coverage-instrument/src/macros/create_instrumentation_visitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ macro_rules! create_instrumentation_visitor {
2020
cov_fn_temp_ident: Ident,
2121
instrument_options: crate::InstrumentOptions,
2222
// Current visitor state to hold stmts to be prepended by parent node.
23-
pub before: Vec<Stmt>,
23+
#[allow(dead_code)] pub before: Vec<Stmt>,
2424
nodes: Vec<crate::Node>,
2525
should_ignore: Option<crate::hint_comments::IgnoreScope>,
2626
$($vis $field: $t,)*

packages/swc-coverage-instrument/src/macros/instrumentation_counter_helper.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ macro_rules! instrumentation_branch_wrap_counter_helper {
44
// if (path.isExpression()) {
55
// path.replaceWith(T.sequenceExpression([increment, path.node]));
66
//}
7+
#[allow(dead_code)]
78
#[tracing::instrument(skip_all)]
89
fn replace_expr_with_stmt_counter(&mut self, expr: &mut Expr) {
910
self.replace_expr_with_counter(expr, |cov, cov_fn_ident, range| {

rust-toolchain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.81.0
1+
nightly-2025-05-06

spec/swc-coverage-instrument-wasm/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unexpected_cfgs)]
2+
13
use serde::Deserialize;
24
use serde::Serialize;
35
use swc_coverage_instrument::FileCoverage;
@@ -12,6 +14,7 @@ pub struct CoverageMagicValue {
1214
value: String,
1315
}
1416

17+
1518
#[wasm_bindgen(js_name = "getCoverageMagicConstants")]
1619
pub fn get_coverage_magic_constants() -> JsValue {
1720
serde_wasm_bindgen::to_value(&CoverageMagicValue {
@@ -31,6 +34,7 @@ pub struct FileCoverageInterop {
3134
impl FileCoverageInterop {
3235
#[wasm_bindgen(constructor)]
3336
pub fn new(val: &JsValue) -> FileCoverageInterop {
37+
#[allow(deprecated)]
3438
let inner: FileCoverage = val.into_serde().unwrap();
3539

3640
FileCoverageInterop { inner }

0 commit comments

Comments
 (0)