Parsing optional field seems to not work for numbers when not filled
Offen
A-web
C-improvement
- Vorherrschende Sprache
- Rust
- Sterne
- 24.8k
- Forks
- 1.9k
- Ø Merge
- 23 Std. 10 Min.
- Gemergte PRs (30 T.)
- 26
Beschreibung
Hello, I currently try to parse a form but I have a Parse error for a specific case:
```
struct TestForm {
text: Option,
number: Option
}
```
1. Whether I filled the text input field or not, it ends up being `Some("whatever") or 'None'.
2. When I fill the number input field (a html text input), It parses to `Some(123)`.
3. But when I don't fill the number field, it fails and return a `Parse error` (a `UrlencodedError::Parse` error apparently)
Same behaviour for f32 so far I've tested.
* Rust Version: 1.48.0
* Actix Web Version: 3.3.2
Thanks a lot for the help.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.