瀏覽代碼

Specify concrete type for Bound::Unbounded

Somehow type inference got confused. Fixes #340.
Zhaofeng Li 5 年之前
父節點
當前提交
31a4d7656b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/iface/route.rs

+ 1 - 1
src/iface/route.rs

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