Skip to content

Commit 4c1e81f

Browse files
authored
Fix infinite recursion when response has Option<T> (#34)
Error log: thread 'main' has overflowed its stack
1 parent daed2d2 commit 4c1e81f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/response.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl<V: FromValue> FromValue for Option<V> {
229229
fn from_value(v: Value) -> ClientResult<Self> {
230230
match v {
231231
Value::Null => Ok(None),
232-
v => FromValue::from_value(v),
232+
v => FromValue::from_value(v).map(|v| Some(v)),
233233
}
234234
}
235235
}

0 commit comments

Comments
 (0)