Skip to content

Commit

Permalink
Fix infinite recursion when response has Option<T> (#35)
Browse files Browse the repository at this point in the history
Error log:
thread 'main' has overflowed its stack
  • Loading branch information
chidea authored and ohsayan committed Dec 14, 2024
2 parents 02fbb0b + c424e3b commit da304ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ impl<V: FromValue> FromValue for Option<V> {
fn from_value(v: Value) -> ClientResult<Self> {
match v {
Value::Null => Ok(None),
v => FromValue::from_value(v),
v => FromValue::from_value(v).map(|v| Some(v)),
}
}
}
Expand Down

0 comments on commit da304ac

Please sign in to comment.