Replace try!
macro in test suite
This commit is contained in:
parent
c5ccb995ad
commit
da346a8878
@ -22,7 +22,7 @@ impl<'de> Visitor<'de> for ByteBufVisitor {
|
||||
V: SeqAccess<'de>,
|
||||
{
|
||||
let mut values = Vec::new();
|
||||
while let Some(value) = try!(visitor.next_element()) {
|
||||
while let Some(value) = visitor.next_element()? {
|
||||
values.push(value);
|
||||
}
|
||||
Ok(values)
|
||||
|
@ -68,7 +68,7 @@ impl DeserializeWith for i32 {
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
if try!(Deserialize::deserialize(de)) {
|
||||
if Deserialize::deserialize(de)? {
|
||||
Ok(123)
|
||||
} else {
|
||||
Ok(2)
|
||||
|
Loading…
Reference in New Issue
Block a user