Specify concrete type for Bound::Unbounded

Somehow type inference got confused. Fixes #340.
This commit is contained in:
Zhaofeng Li 2020-05-15 02:19:15 -07:00 committed by whitequark
parent 386f50dbd2
commit d8c604f567
1 changed files with 1 additions and 1 deletions

View File

@ -117,7 +117,7 @@ impl<'a> Routes<'a> {
_ => unimplemented!()
};
for (prefix, route) in self.storage.range((Bound::Unbounded, Bound::Included(cidr))).rev() {
for (prefix, route) in self.storage.range((Bound::Unbounded::<IpCidr>, Bound::Included(cidr))).rev() {
// TODO: do something with route.preferred_until
if let Some(expires_at) = route.expires_at {
if timestamp > expires_at {