diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-02-03 05:25:25 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-02-03 05:25:25 +0100 |
| commit | a7d1d02be022b6dd1e5170780b509057f150ca9d (patch) | |
| tree | 24e3bb20d858b0d6ab2e42a26c5cdc988570a233 | |
| parent | 803162f11b4c8200ce1d39b5a4588a163f1b439a (diff) | |
Remove use of feature(const_in_array_repeat_expressions)
| -rw-r--r-- | embassy-net/src/lib.rs | 1 | ||||
| -rw-r--r-- | embassy-net/src/stack.rs | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/embassy-net/src/lib.rs b/embassy-net/src/lib.rs index a2a320adf..fe1d529d8 100644 --- a/embassy-net/src/lib.rs +++ b/embassy-net/src/lib.rs | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | #![cfg_attr(not(feature = "std"), no_std)] | 1 | #![cfg_attr(not(feature = "std"), no_std)] |
| 2 | #![feature(const_fn)] | 2 | #![feature(const_fn)] |
| 3 | #![feature(const_in_array_repeat_expressions)] | ||
| 4 | #![feature(const_generics)] | 3 | #![feature(const_generics)] |
| 5 | #![feature(const_evaluatable_checked)] | 4 | #![feature(const_evaluatable_checked)] |
| 6 | #![allow(incomplete_features)] | 5 | #![allow(incomplete_features)] |
diff --git a/embassy-net/src/stack.rs b/embassy-net/src/stack.rs index c353f1bb1..d1dcb3bc9 100644 --- a/embassy-net/src/stack.rs +++ b/embassy-net/src/stack.rs | |||
| @@ -146,10 +146,11 @@ impl Stack { | |||
| 146 | /// Initialize embassy_net. | 146 | /// Initialize embassy_net. |
| 147 | /// This function must be called from thread mode. | 147 | /// This function must be called from thread mode. |
| 148 | pub fn init(device: &'static mut dyn Device, configurator: &'static mut dyn Configurator) { | 148 | pub fn init(device: &'static mut dyn Device, configurator: &'static mut dyn Configurator) { |
| 149 | const NONE_SOCKET: Option<SocketSetItem<'static>> = None; | ||
| 149 | let res = STACK_RESOURCES.put(StackResources { | 150 | let res = STACK_RESOURCES.put(StackResources { |
| 150 | addresses: [IpCidr::new(Ipv4Address::UNSPECIFIED.into(), 32)], | 151 | addresses: [IpCidr::new(Ipv4Address::UNSPECIFIED.into(), 32)], |
| 151 | neighbor_cache: [None; NEIGHBOR_CACHE_LEN], | 152 | neighbor_cache: [None; NEIGHBOR_CACHE_LEN], |
| 152 | sockets: [None; SOCKETS_LEN], | 153 | sockets: [NONE_SOCKET; SOCKETS_LEN], |
| 153 | routes: [None; 1], | 154 | routes: [None; 1], |
| 154 | }); | 155 | }); |
| 155 | 156 | ||
