Browse Source

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 years ago
parent
commit
7faa206eff
2 changed files with 4 additions and 4 deletions
  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.
 
 _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
 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)]
-pub struct RxToken<'a, Rx: phy::RxToken, F: Fuzzer>{
+pub struct RxToken<'a, Rx: phy::RxToken, F: Fuzzer + 'a>{
     fuzzer: &'a F,
-    token:   Rx,
+    token:  Rx,
 }
 
 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)]
-pub struct TxToken<'a, Tx: phy::TxToken, F: Fuzzer> {
+pub struct TxToken<'a, Tx: phy::TxToken, F: Fuzzer + 'a> {
     fuzzer: &'a F,
     token:  Tx,
 }