Replace try! macro in test suite

This commit is contained in:
David Tolnay 2018-12-31 21:46:14 -05:00
parent c5ccb995ad
commit da346a8878
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)