Skip to content

Commit

Permalink
Rename 'try!' macro to 'tri!' in preparation for 2018 edition
Browse files Browse the repository at this point in the history
Because 'try' is a keyword in 2018+.
  • Loading branch information
dtolnay committed Jul 31, 2023
1 parent ba12070 commit 9388433
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 167 deletions.
6 changes: 3 additions & 3 deletions serde/src/de/ignored_any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl<'de> Visitor<'de> for IgnoredAny {
where
A: SeqAccess<'de>,
{
while let Some(IgnoredAny) = try!(seq.next_element()) {
while let Some(IgnoredAny) = tri!(seq.next_element()) {
// Gobble
}
Ok(IgnoredAny)
Expand All @@ -208,7 +208,7 @@ impl<'de> Visitor<'de> for IgnoredAny {
where
A: MapAccess<'de>,
{
while let Some((IgnoredAny, IgnoredAny)) = try!(map.next_entry()) {
while let Some((IgnoredAny, IgnoredAny)) = tri!(map.next_entry()) {
// Gobble
}
Ok(IgnoredAny)
Expand All @@ -227,7 +227,7 @@ impl<'de> Visitor<'de> for IgnoredAny {
where
A: EnumAccess<'de>,
{
try!(data.variant::<IgnoredAny>()).1.newtype_variant()
tri!(data.variant::<IgnoredAny>()).1.newtype_variant()
}
}

Expand Down
Loading

0 comments on commit 9388433

Please sign in to comment.