mirror of
https://github.com/teloxide/teloxide.git
synced 2025-03-14 11:44:04 +01:00
Use serde_json::from_value in Update::try_parse
This commit is contained in:
parent
cd9a98163c
commit
e400fb16e7
1 changed files with 1 additions and 1 deletions
|
@ -34,7 +34,7 @@ impl Update {
|
|||
///
|
||||
/// It is used to implement update listeners.
|
||||
pub fn try_parse(value: &Value) -> Result<Self, serde_json::Error> {
|
||||
match serde_json::from_str(&value.to_string()) {
|
||||
match serde_json::from_value(value.clone()) {
|
||||
Ok(update) => Ok(update),
|
||||
Err(error) => {
|
||||
log::error!(
|
||||
|
|
Loading…
Add table
Reference in a new issue