浏览代码

Bump Rust version requirement to 1.28.

Actually, this is not a new requirement at all; because we do not
check the minimum version on CI, some dependencies on 1.28 have
already sneaked in. In particular, our required version of the crate
managed only works on 1.28+.

This allows us to use:
(1.28)
  - ops::RangeBounds
  - num::NonZero

Some trait bounds were added to make sure everything builds on 1.28.
whitequark 5 年之前
父节点
当前提交
7faa206eff
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 1 1
      README.md
  2. 3 3
      src/phy/fuzz_injector.rs

+ 1 - 1
README.md

@@ -6,7 +6,7 @@ include complicated compile-time computations, such as macro or type tricks, eve
 at cost of performance degradation.
 at cost of performance degradation.
 
 
 _smoltcp_ does not need heap allocation *at all*, is [extensively documented][docs],
 _smoltcp_ does not need heap allocation *at all*, is [extensively documented][docs],
-and compiles on stable Rust 1.27 and later.
+and compiles on stable Rust 1.28 and later.
 
 
 _smoltcp_ achieves [~Gbps of throughput](#examplesbenchmarkrs) when tested against
 _smoltcp_ achieves [~Gbps of throughput](#examplesbenchmarkrs) when tested against
 the Linux TCP stack in loopback mode.
 the Linux TCP stack in loopback mode.

+ 3 - 3
src/phy/fuzz_injector.rs

@@ -78,9 +78,9 @@ impl<'a, D, FTx, FRx> Device<'a> for FuzzInjector<D, FTx, FRx>
 }
 }
 
 
 #[doc(hidden)]
 #[doc(hidden)]
-pub struct RxToken<'a, Rx: phy::RxToken, F: Fuzzer>{
+pub struct RxToken<'a, Rx: phy::RxToken, F: Fuzzer + 'a>{
     fuzzer: &'a F,
     fuzzer: &'a F,
-    token:   Rx,
+    token:  Rx,
 }
 }
 
 
 impl<'a, Rx: phy::RxToken, FRx: Fuzzer> phy::RxToken for RxToken<'a, Rx, FRx> {
 impl<'a, Rx: phy::RxToken, FRx: Fuzzer> phy::RxToken for RxToken<'a, Rx, FRx> {
@@ -96,7 +96,7 @@ impl<'a, Rx: phy::RxToken, FRx: Fuzzer> phy::RxToken for RxToken<'a, Rx, FRx> {
 }
 }
 
 
 #[doc(hidden)]
 #[doc(hidden)]
-pub struct TxToken<'a, Tx: phy::TxToken, F: Fuzzer> {
+pub struct TxToken<'a, Tx: phy::TxToken, F: Fuzzer + 'a> {
     fuzzer: &'a F,
     fuzzer: &'a F,
     token:  Tx,
     token:  Tx,
 }
 }