diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 2434f08..5bfe5f6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,6 +9,10 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: true + env: CARGO_TERM_COLOR: always @@ -40,18 +44,24 @@ jobs: - name: Install Rust toolchain uses: dtolnay/rust-toolchain@nightly + with: + toolchain: nightly-2025-07-14 + components: clippy, rustfmt - - name: Install format - run: rustup component add rustfmt + - name: Cache Rust dependencies + uses: Swatinem/rust-cache@v2 - - name: Check format with nightly rules - run: cargo +nightly fmt -- --check --config error_on_unformatted=true,error_on_line_overflow=true,format_strings=true,group_imports=StdExternalCrate,imports_granularity=Crate + - name: Formating - check for long lines + run: cargo fmt -- --check --config error_on_unformatted=true,error_on_line_overflow=true,format_strings=true - - name: install clippy - run: rustup component add clippy --toolchain nightly + - name: Formatting - check import order + run: cargo fmt -- --check --config group_imports=StdExternalCrate + + - name: Formatting - check imports granularity + run: cargo fmt -- --check --config imports_granularity=Crate - name: run clippy nightly - run: cargo +nightly clippy --all-targets -- -D warnings + run: cargo clippy --all-targets -- -D warnings build: runs-on: ubuntu-latest diff --git a/examples/worf-warden/src/main.rs b/examples/worf-warden/src/main.rs index 9f82902..45af06e 100644 --- a/examples/worf-warden/src/main.rs +++ b/examples/worf-warden/src/main.rs @@ -132,12 +132,6 @@ fn keyboard_return(config: &WardenConfig) { fn keyboard_auto_type(cmd: &str, id: &str, config: &WardenConfig) -> Result<(), String> { let mut input = cmd.replace('_', ""); - //.replace("$U", &user).replace("$P", &pw); - - // if input.contains("$T") { - // input = input.replace("$T", &rbw_get_totp(id, false)?); - // } - while !input.is_empty() { // Remove up to and including the first '$' diff --git a/worf/src/lib/modes/file.rs b/worf/src/lib/modes/file.rs index d130c37..9a5d680 100644 --- a/worf/src/lib/modes/file.rs +++ b/worf/src/lib/modes/file.rs @@ -207,7 +207,6 @@ pub fn show(config: &Arc>) -> Result<(), Error> { config.read().unwrap().sort_order(), ))); - // todo ues a arc instead of cloning the config let selection_result = gui::show( config, provider,