dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

Dioxus vscode extension messes up the code during reformatting

Open umnovI opened this issue 1 year ago • 0 comments

Problem

Dioxus vscode extension removes key keyword from iterator. I'm not sure if this is a correct behavior, but based on this part of documentation https://dioxuslabs.com/learn/0.5/cookbook/antipatterns#incorrect-iterator-keys the key should stay there. Reformatting breaks todomvc.

Steps To Reproduce

Steps to reproduce the behavior:

  • Install Dioxus extension for vscode with vscode set to reformat on save.
  • Open todomvc.rs
  • Press ctrl+s
  • See the changes. Explicitly line 87

Expected behavior

key should not be removed(?) I'm not that familiar with the rest of the syntax to comment on other changes that were made.

Screenshots

image

image

Environment:

  • Dioxus version: master 7eccc7a104df013b06c104fc1275450d2747e78c
  • Rust version: rustc 1.77.1 (7cf61ebde 2024-03-27)
  • OS info: win11
  • App platform: desktop
  • Extension version: v0.5.0
  • dx --version: 0.5.4

Questionnaire

  • [ ] I'm interested in fixing this myself but don't know where to start
  • [ ] I would like to fix and I have a solution
  • [x] I don't have time to fix this right now, but maybe later

umnovI avatar Apr 05 '24 13:04 umnovI