Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tedbyron opened this issue Jul 10, 2022 · 0 comments
Closed
Labels
priority: 3 low scope: core Core packages of Tauri status: backlog Issue is ready and we can work on it type: bug

Comments

@tedbyron
Copy link

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

@tedbyron tedbyron added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jul 10, 2022
@amrbashir amrbashir added scope: core Core packages of Tauri priority: 3 low status: backlog Issue is ready and we can work on it and removed status: needs triage This issue needs to triage, applied to new issues labels Jul 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: 3 low scope: core Core packages of Tauri status: backlog Issue is ready and we can work on it type: bug
Projects
None yet
Development

No branches or pull requests

2 participants