DioxusLabs / DioxusLabs/dioxus

dx fmt crashes on if let

Open
#4,268 3 comments 0 reactions 0 assignees View on GitHub
autoformatting bug
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

**Steps To Reproduce**

I have this in my rsx which seems to crash `dx fmt`:

```rust
if let DragState::Dragging(dragged_index) | DragState::Dragover(dragged_index, _) = drag_state() {
```

It prints this error:

```
thread '' panicked at /home/tim/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/prettyplease-0.2.32/src/item.rs:578:23:
not implemented: Item::Verbatim `fn main () { let DragState :: Dragging (dragged_index) | DragState :: Dragover (dragged_index , _) = drag_state () ; }`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

**Expected behavior**

**Screenshots**

**Environment:**

- Dioxus version: 0.6.3
- Rust version: 1.87.0
- OS info: Arch Linux
- App platform: web

**Questionnaire**

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.