We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d97df29 commit 2cca2b5Copy full SHA for 2cca2b5
1 file changed
src/error.rs
@@ -533,10 +533,10 @@ impl DbError {
533
detail: map.remove(&b'D'),
534
hint: map.remove(&b'H'),
535
position: match map.remove(&b'P') {
536
- Some(pos) => Some(ErrorPosition::Normal(try!(pos.parse().ok().ok_or(())))),
+ Some(pos) => Some(ErrorPosition::Normal(try!(pos.parse().map_err(|_| ())))),
537
None => match map.remove(&b'p') {
538
Some(pos) => Some(ErrorPosition::Internal {
539
- position: try!(pos.parse().ok().ok_or(())),
+ position: try!(pos.parse().map_err(|_| ())),
540
query: try!(map.remove(&b'q').ok_or(()))
541
}),
542
None => None
0 commit comments