Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
Merge pull request #60 from obsidian-rs/hotfix/uri_query_stack_overflow
Browse files Browse the repository at this point in the history
hotfix: deserializer panic while error occurs
  • Loading branch information
plwai committed May 3, 2020
2 parents 9ade483 + 8808ccb commit ef4e243
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ path = 'examples/app_state.rs'

[package]
name = 'obsidian'
version = '0.2.1'
version = '0.2.2'
authors = [
'Gan Jun Kai <[email protected]>',
'Wai Pai Lee <[email protected]>',
Expand Down
12 changes: 4 additions & 8 deletions src/router/req_deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,19 +423,15 @@ impl de::Error for Error {

impl Display for Error {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter.write_str(&self.to_string())
}
}

impl std::error::Error for Error {
fn description(&self) -> &str {
match *self {
Error::Message(ref msg) => msg,
Error::NoneError => "Input should not be None",
Error::Message(ref msg) => formatter.write_str(msg),
Error::NoneError => formatter.write_str("Input should not be None"),
}
}
}

impl std::error::Error for Error {}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit ef4e243

Please sign in to comment.