From 77f71b6de782b3946fe605b29b4e90cfbde97d24 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Tue, 16 Nov 2021 11:05:27 -0800 Subject: [PATCH] Fix rust build breakage caused by bare-io package being yanked. Didn't find an explanation for why all versions of bare-io were yanked but core2 has the Cursor support and is by the same author. Change-Id: Id27adaa568a8e1b7b5825c8f81aa489a96675969 GitOrigin-RevId: 7fb8950938c9536a9c795b246d240fca756b3499 --- apps/system/components/DebugConsole/kata-logger/Cargo.toml | 2 +- apps/system/components/DebugConsole/kata-logger/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/system/components/DebugConsole/kata-logger/Cargo.toml b/apps/system/components/DebugConsole/kata-logger/Cargo.toml index fb9e70f..e0ed5ae 100644 --- a/apps/system/components/DebugConsole/kata-logger/Cargo.toml +++ b/apps/system/components/DebugConsole/kata-logger/Cargo.toml @@ -5,7 +5,7 @@ edition = "2018" [dependencies] arrayvec = { version = "0.7", default-features = false } +core2 = { version = "0.3", default-features = false } # Disable default so we don't pull in CString which requires an allocator -bare-io = "0.2" cstr_core = { version = "0.2.3", default-features = false } log = "0.4" diff --git a/apps/system/components/DebugConsole/kata-logger/src/lib.rs b/apps/system/components/DebugConsole/kata-logger/src/lib.rs index 3939819..62fb7f5 100644 --- a/apps/system/components/DebugConsole/kata-logger/src/lib.rs +++ b/apps/system/components/DebugConsole/kata-logger/src/lib.rs @@ -1,6 +1,7 @@ #![cfg_attr(not(test), no_std)] use cstr_core::CStr; +use core2::io::{Cursor, Write}; use log::{Metadata, Record}; // TODO(sleffler): until we can copy directly into shared memory limit @@ -19,7 +20,6 @@ impl log::Log for KataLogger { extern "C" { fn logger_log(level: u8, msg: *const cstr_core::c_char); } - use bare_io::{Cursor, Write}; let mut buf = [0 as u8; MAX_MSG_LEN]; let mut cur = Cursor::new(&mut buf[..]); // Log msgs are of the form: '::