From c800b6c8d3db08b11efaf761c6eb94af5a09d309 Mon Sep 17 00:00:00 2001 From: occheung Date: Fri, 6 Aug 2021 11:07:47 +0800 Subject: [PATCH] runtime: update rust alloc, managed --- artiq/firmware/runtime/Cargo.toml | 2 +- artiq/firmware/runtime/cache.rs | 2 +- artiq/firmware/runtime/main.rs | 2 +- artiq/firmware/runtime/moninj.rs | 2 +- artiq/firmware/runtime/rtio_dma.rs | 2 +- artiq/firmware/runtime/sched.rs | 2 +- artiq/firmware/runtime/session.rs | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/artiq/firmware/runtime/Cargo.toml b/artiq/firmware/runtime/Cargo.toml index f8139cc57..f96d4d29d 100644 --- a/artiq/firmware/runtime/Cargo.toml +++ b/artiq/firmware/runtime/Cargo.toml @@ -18,7 +18,7 @@ failure_derive = { version = "0.1", default-features = false } byteorder = { version = "1.0", default-features = false } cslice = { version = "0.3" } log = { version = "0.4", default-features = false } -managed = { version = "= 0.7.0", default-features = false, features = ["alloc", "map"] } +managed = { version = "^0.7.1", default-features = false, features = ["alloc", "map"] } eh = { path = "../libeh" } unwind_backtrace = { path = "../libunwind_backtrace" } io = { path = "../libio", features = ["byteorder"] } diff --git a/artiq/firmware/runtime/cache.rs b/artiq/firmware/runtime/cache.rs index 2f1948924..a950fab3b 100644 --- a/artiq/firmware/runtime/cache.rs +++ b/artiq/firmware/runtime/cache.rs @@ -1,4 +1,4 @@ -use alloc::{Vec, String, BTreeMap}; +use alloc::{vec::Vec, string::String, collections::btree_map::BTreeMap}; #[derive(Debug)] struct Entry { diff --git a/artiq/firmware/runtime/main.rs b/artiq/firmware/runtime/main.rs index 590f99564..968aba156 100644 --- a/artiq/firmware/runtime/main.rs +++ b/artiq/firmware/runtime/main.rs @@ -147,7 +147,7 @@ fn startup() { }; let neighbor_cache = - smoltcp::iface::NeighborCache::new(alloc::btree_map::BTreeMap::new()); + smoltcp::iface::NeighborCache::new(alloc::collections::btree_map::BTreeMap::new()); let net_addresses = net_settings::get_adresses(); info!("network addresses: {}", net_addresses); let mut interface = match net_addresses.ipv6_addr { diff --git a/artiq/firmware/runtime/moninj.rs b/artiq/firmware/runtime/moninj.rs index 3d3d06c40..44a138bc0 100644 --- a/artiq/firmware/runtime/moninj.rs +++ b/artiq/firmware/runtime/moninj.rs @@ -1,4 +1,4 @@ -use alloc::btree_map::BTreeMap; +use alloc::collections::btree_map::BTreeMap; use core::cell::RefCell; use io::Error as IoError; diff --git a/artiq/firmware/runtime/rtio_dma.rs b/artiq/firmware/runtime/rtio_dma.rs index 39e61d621..292874047 100644 --- a/artiq/firmware/runtime/rtio_dma.rs +++ b/artiq/firmware/runtime/rtio_dma.rs @@ -1,5 +1,5 @@ use core::mem; -use alloc::{Vec, String, BTreeMap}; +use alloc::{vec::Vec, string::String, collections::btree_map::BTreeMap}; const ALIGNMENT: usize = 64; diff --git a/artiq/firmware/runtime/sched.rs b/artiq/firmware/runtime/sched.rs index 7a2a85723..a63ad3332 100644 --- a/artiq/firmware/runtime/sched.rs +++ b/artiq/firmware/runtime/sched.rs @@ -3,7 +3,7 @@ use core::mem; use core::result; use core::cell::{Cell, RefCell}; -use alloc::Vec; +use alloc::vec::Vec; use fringe::OwnedStack; use fringe::generator::{Generator, Yielder, State as GeneratorState}; use smoltcp::time::Duration; diff --git a/artiq/firmware/runtime/session.rs b/artiq/firmware/runtime/session.rs index 08bc5f188..bae438969 100644 --- a/artiq/firmware/runtime/session.rs +++ b/artiq/firmware/runtime/session.rs @@ -1,5 +1,5 @@ use core::{mem, str, cell::{Cell, RefCell}, fmt::Write as FmtWrite}; -use alloc::{Vec, String}; +use alloc::{vec::Vec, string::String}; use byteorder::{ByteOrder, NetworkEndian}; use io::{Read, Write, Error as IoError};