[DEV-7086] TAMER: ir::asg::TransitionError::BadFragmentDest tuple=>struct

Consistency.
master
Mike Gerwitz 2020-04-06 09:08:38 -04:00
parent da5057058d
commit b870480944
1 changed files with 4 additions and 4 deletions

View File

@ -425,7 +425,7 @@ impl<'i> IdentObjectState<'i, IdentObject<'i>> for IdentObject<'i> {
self,
);
Err((self, TransitionError::BadFragmentDest(msg)))
Err((self, TransitionError::BadFragmentDest { name: msg }))
}
}
}
@ -464,7 +464,7 @@ pub enum TransitionError {
/// receive a fragment.
///
/// See [`IdentObjectState::set_fragment`].
BadFragmentDest(String),
BadFragmentDest { name: String },
}
impl std::fmt::Display for TransitionError {
@ -502,7 +502,7 @@ impl std::fmt::Display for TransitionError {
name, existing, given,
),
Self::BadFragmentDest(msg) => {
Self::BadFragmentDest{name: msg} => {
write!(fmt, "bad fragment destination: {}", msg)
}
}
@ -1029,7 +1029,7 @@ mod test {
.expect_err("Expected failure");
match err {
(orig, TransitionError::BadFragmentDest(str))
(orig, TransitionError::BadFragmentDest { name: str })
if str.contains("badsym") =>
{
assert_eq!(ident_with_frag, orig);