Skip to content

Commit

Permalink
Use matches! macro (#553)
Browse files Browse the repository at this point in the history
Apparently our Windows runner has been updated, so this
should work now.
  • Loading branch information
HCastano committed Jun 2, 2020
1 parent e2569b9 commit ef92a48
Showing 1 changed file with 3 additions and 15 deletions.
18 changes: 3 additions & 15 deletions pubsub/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,7 @@ mod tests {
sink.sink_map_err(|_| ()).send_all(stream).map(|_| ())
});

if let SubscriptionId::String(_) = id {
assert!(true)
} else {
assert!(false, "Expected SubscriptionId::String");
}
assert!(matches!(id, SubscriptionId::String(_)))
}

#[test]
Expand All @@ -325,11 +321,7 @@ mod tests {
sink.sink_map_err(|_| ()).send_all(stream).map(|_| ())
});

if let SubscriptionId::Number(_) = id {
assert!(true)
} else {
assert!(false, "Expected SubscriptionId::Number");
}
assert!(matches!(id, SubscriptionId::Number(_)))
}

#[test]
Expand All @@ -346,11 +338,7 @@ mod tests {
sink.sink_map_err(|_| ()).send_all(stream).map(|_| ())
});

if let SubscriptionId::String(_) = id {
assert!(true)
} else {
assert!(false, "Expected SubscriptionId::String");
}
assert!(matches!(id, SubscriptionId::String(_)))
}

#[test]
Expand Down

0 comments on commit ef92a48

Please sign in to comment.