diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index 48912014f..2d5dc151c 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -34,13 +34,11 @@ jobs: steps: - uses: actions/checkout@v4 - name: install ${{ matrix.rust }} - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} - override: true - default: true components: rust-src - target: ${{ matrix.platform.target }} + targets: ${{ matrix.platform.target }} - name: setup python uses: actions/setup-python@v2 diff --git a/.github/workflows/check-generated-files.yml b/.github/workflows/check-generated-files.yml index bedafbece..fd5a2d5c1 100644 --- a/.github/workflows/check-generated-files.yml +++ b/.github/workflows/check-generated-files.yml @@ -58,11 +58,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + - uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies run: | @@ -74,10 +70,7 @@ jobs: workspaces: core -> ../target - name: generate schema.json - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./core/tauri-config-schema/Cargo.toml + run: cargo build --manifest-path ./core/tauri-config-schema/Cargo.toml - name: check schema run: ./.scripts/ci/has-diff.sh diff --git a/.github/workflows/covector-version-or-publish.yml b/.github/workflows/covector-version-or-publish.yml index a2b655441..d651d6f54 100644 --- a/.github/workflows/covector-version-or-publish.yml +++ b/.github/workflows/covector-version-or-publish.yml @@ -22,10 +22,9 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + + - uses: dtolnay/rust-toolchain@stable + - name: install Linux dependencies if: matrix.platform == 'ubuntu-22.04' run: | @@ -39,10 +38,7 @@ jobs: tooling/cli - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo build --manifest-path ./tooling/cli/Cargo.toml - name: run integration tests run: cargo test --test '*' -- --ignored diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index cdf6b1f87..b87e3e439 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -19,10 +19,7 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies run: | @@ -40,10 +37,7 @@ jobs: if-no-files-found: error - name: build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo build --manifest-path ./tooling/cli/Cargo.toml - name: Upload CLI uses: actions/upload-artifact@v4 @@ -66,13 +60,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - toolchain: stable - override: true - default: true - target: ${{ matrix.target.name }} + targets: ${{ matrix.target.name }} - name: Setup node uses: actions/setup-node@v4 diff --git a/.github/workflows/lint-cli.yml b/.github/workflows/lint-cli.yml index 75a4e5423..dc8547c2b 100644 --- a/.github/workflows/lint-cli.yml +++ b/.github/workflows/lint-cli.yml @@ -29,17 +29,12 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path ./tooling/cli/Cargo.toml --all -- --check + - name: Check formatting + run: cargo fmt --manifest-path ./tooling/cli/Cargo.toml --all -- --check clippy: runs-on: ubuntu-latest @@ -47,11 +42,8 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - name: install dependencies @@ -63,8 +55,5 @@ jobs: with: workspaces: tooling/cli - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings - name: cli + - name: Run clippy + run: cargo clippy --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings diff --git a/.github/workflows/lint-core.yml b/.github/workflows/lint-core.yml index 09968fd24..52d612d29 100644 --- a/.github/workflows/lint-core.yml +++ b/.github/workflows/lint-core.yml @@ -31,17 +31,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - run: cargo fmt --all -- --check clippy: runs-on: ubuntu-22.04 @@ -64,11 +58,8 @@ jobs: sudo apt-get update sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: clippy - uses: Swatinem/rust-cache@v2 @@ -76,8 +67,4 @@ jobs: workspaces: core -> ../target save-if: ${{ matrix.clippy.key == 'all' }} - - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./core/tauri/Cargo.toml --all-targets ${{ matrix.clippy.args }} -- -D warnings - name: ${{ matrix.clippy.key }} + - run: cargo clippy --manifest-path ./core/tauri/Cargo.toml --all-targets ${{ matrix.clippy.args }} -- -D warnings diff --git a/.github/workflows/publish-cli-js.yml b/.github/workflows/publish-cli-js.yml index aef8ea94c..4dd16d6f0 100644 --- a/.github/workflows/publish-cli-js.yml +++ b/.github/workflows/publish-cli-js.yml @@ -101,14 +101,10 @@ jobs: cache: yarn cache-dependency-path: "tooling/cli/node/yarn.lock" architecture: ${{ matrix.settings.architecture }} - - name: Install - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable if: ${{ !matrix.settings.docker }} with: - profile: minimal - override: true - toolchain: stable - target: ${{ matrix.settings.target }} + targets: ${{ matrix.settings.target }} - uses: Swatinem/rust-cache@v1 with: key: ${{ matrix.settings.target }} diff --git a/.github/workflows/publish-cli-rs.yml b/.github/workflows/publish-cli-rs.yml index c1f9392f3..39f4483f6 100644 --- a/.github/workflows/publish-cli-rs.yml +++ b/.github/workflows/publish-cli-rs.yml @@ -59,10 +59,7 @@ jobs: sudo apt-get install -y libgtk-3-dev - name: Build CLI - uses: actions-rs/cargo@v1 - with: - command: build - args: --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }} + run: cargo build --manifest-path ./tooling/cli/Cargo.toml --release ${{ matrix.config.args }} - name: Upload CLI uses: actions/upload-artifact@v4 diff --git a/.github/workflows/test-cli-js.yml b/.github/workflows/test-cli-js.yml index ddda47275..4e321718f 100644 --- a/.github/workflows/test-cli-js.yml +++ b/.github/workflows/test-cli-js.yml @@ -36,10 +36,8 @@ jobs: - uses: actions/checkout@v4 - name: install Rust stable - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.71 - override: true + uses: dtolnay/rust-toolchain@1.71 + - name: setup node uses: actions/setup-node@v4 with: diff --git a/.github/workflows/test-cli-rs.yml b/.github/workflows/test-cli-rs.yml index c6c5ffa6f..c430d38f4 100644 --- a/.github/workflows/test-cli-rs.yml +++ b/.github/workflows/test-cli-rs.yml @@ -35,10 +35,7 @@ jobs: - uses: actions/checkout@v4 - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: 1.71.0 - override: true + uses: dtolnay/rust-toolchain@1.71 - name: install Linux dependencies if: matrix.platform == 'ubuntu-latest' @@ -51,7 +48,4 @@ jobs: workspaces: tooling/cli - name: test CLI - uses: actions-rs/cargo@v1 - with: - command: test - args: --manifest-path ./tooling/cli/Cargo.toml + run: cargo test --manifest-path ./tooling/cli/Cargo.toml diff --git a/.github/workflows/test-core.yml b/.github/workflows/test-core.yml index e221ff773..d81199ce7 100644 --- a/.github/workflows/test-core.yml +++ b/.github/workflows/test-core.yml @@ -65,13 +65,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ matrix.platform.toolchain }} - target: ${{ matrix.platform.target }} - override: true - default: true + targets: ${{ matrix.platform.target }} - name: install Linux dependencies if: contains(matrix.platform.target, 'unknown-linux') diff --git a/.github/workflows/test-lint-bundler.yml b/.github/workflows/test-lint-bundler.yml index 0391ed1b1..5f97297d2 100644 --- a/.github/workflows/test-lint-bundler.yml +++ b/.github/workflows/test-lint-bundler.yml @@ -34,10 +34,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 with: @@ -54,17 +51,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 + - uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true components: rustfmt - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --manifest-path ./tooling/bundler/Cargo.toml --all -- --check + - run: cargo fmt --manifest-path ./tooling/bundler/Cargo.toml --all -- --check clippy: runs-on: ubuntu-22.04 @@ -73,12 +64,8 @@ jobs: - uses: actions/checkout@v4 - name: install minimal stable with clippy and rustfmt - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: - profile: minimal - toolchain: stable - override: true - default: true components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 @@ -86,8 +73,4 @@ jobs: workspaces: tooling/bundler - name: clippy check - uses: actions-rs/clippy-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings - name: bundler + run: cargo clippy --manifest-path ./tooling/bundler/Cargo.toml --all-targets -- -D warnings diff --git a/.github/workflows/test-updater-artifacts.yml b/.github/workflows/test-updater-artifacts.yml index 2c83f790f..ab9c5213e 100644 --- a/.github/workflows/test-updater-artifacts.yml +++ b/.github/workflows/test-updater-artifacts.yml @@ -31,10 +31,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: install stable - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + + - uses: dtolnay/rust-toolchain@stable - name: install Linux dependencies if: matrix.platform == 'ubuntu-22.04' diff --git a/.github/workflows/udeps.yml b/.github/workflows/udeps.yml index 8a1be503b..46ad7575a 100644 --- a/.github/workflows/udeps.yml +++ b/.github/workflows/udeps.yml @@ -74,16 +74,9 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true + - uses: dtolnay/rust-toolchain@nightly - - uses: actions-rs/cargo@v1 - with: - command: install - args: cargo-udeps --locked --force + - run: cargo install cargo-udeps --locked --force - name: Upload udeps uses: actions/upload-artifact@v4 @@ -128,11 +121,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: nightly - override: true + - uses: dtolnay/rust-toolchain@nightly - name: install dependencies run: | @@ -159,7 +148,4 @@ jobs: sudo apt-get update sudo apt-get install -y webkit2gtk-4.0 libayatana-appindicator3-dev - - uses: actions-rs/cargo@v1 - with: - command: udeps - args: --manifest-path ${{ matrix.path }}/Cargo.toml --all-targets --all-features + - run: cargo udeps --manifest-path ${{ matrix.path }}/Cargo.toml --all-targets --all-features diff --git a/core/tauri/src/api/ipc.rs b/core/tauri/src/api/ipc.rs index 95a511601..667272c55 100644 --- a/core/tauri/src/api/ipc.rs +++ b/core/tauri/src/api/ipc.rs @@ -46,7 +46,7 @@ const MIN_JSON_PARSE_LEN: usize = 10_240; /// /// 1. `serde_json`'s ability to correctly escape and format json into a string. /// 2. JavaScript engines not accepting anything except another unescaped, literal single quote -/// character to end a string that was opened with it. +/// character to end a string that was opened with it. /// /// # Examples ///