aboutsummaryrefslogtreecommitdiff
path: root/embassy-net/src/stack.rs
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2021-02-03 05:25:25 +0100
committerDario Nieuwenhuis <[email protected]>2021-02-03 05:25:25 +0100
commita7d1d02be022b6dd1e5170780b509057f150ca9d (patch)
tree24e3bb20d858b0d6ab2e42a26c5cdc988570a233 /embassy-net/src/stack.rs
parent803162f11b4c8200ce1d39b5a4588a163f1b439a (diff)
Remove use of feature(const_in_array_repeat_expressions)
Diffstat (limited to 'embassy-net/src/stack.rs')
-rw-r--r--embassy-net/src/stack.rs3
1 files changed, 2 insertions, 1 deletions
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.
148pub fn init(device: &'static mut dyn Device, configurator: &'static mut dyn Configurator) { 148pub 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