Skip to content

[bug] tauri::command macro causes clippy::items-after-statements lint #4639

Closed

Description

@tedbyron

Describe the bug

This is part of clippy's pedantic lint group so it's not on by default, but some part of the tauri::command macro must generate items after they are used in statements: https://rust-lang.github.io/rust-clippy/master/index.html#items_after_statements

Reproduction

Run cargo clippy -- -Wclippy::pedantic in any tauri app that uses tauri::command

Expected behavior

the macro should generated well-formatted rust code so that you don't get clippy lints on it

Platform and versions

Environment
  › OS: Mac OS 12.4.0 X64
  › Node.js: 16.16.0
  › npm: 8.13.2
  › pnpm: Not installed!
  › yarn: 3.2.1
  › rustup: 1.24.3
  › rustc: 1.62.0
  › cargo: 1.62.0
  › Rust toolchain: stable-aarch64-apple-darwin

Packages
  › @tauri-apps/cli [NPM]: 1.0.3
  › @tauri-apps/api [NPM]: 1.0.2
  › tauri [RUST]: 1.0.3,
  › tauri-build [RUST]: 1.0.3,
  › tao [RUST]: 0.12.1,
  › wry [RUST]: 0.19.0,

App
  › build-type: bundle
  › CSP: default-src: 'self'; media-src 'self' asset: https://asset.localhost
  › distDir: ../build
  › devPath: http://localhost:3000/
  › framework: Svelte

App directory structure
  ├─ .yarn
  ├─ node_modules
  ├─ crate
  ├─ .svelte-kit
  ├─ build
  ├─ .git
  ├─ .vscode
  └─ src

Stack trace

No response

Additional context

No response

Activity

  1. added
    scope: coreCore packages of Tauri
    priority: 3 lowAccepted but likely won't be worked on
    status: backlogIssue is ready and we can work on it
    and removed
    status: needs triageThis issue needs to triage, applied to new issues
    on Jul 10, 2022
  2. added a commit that references this issue on Dec 9, 2024
    d3e19e3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions