diff --git a/src/aml.rs b/src/aml.rs index 18f792e..d84cad0 100644 --- a/src/aml.rs +++ b/src/aml.rs @@ -1697,8 +1697,8 @@ impl<'a> Aml for PowerResource<'a> { #[cfg(test)] mod tests { + use alloc::borrow::ToOwned; use super::*; - use std::vec; #[test] fn test_device() { diff --git a/src/bert.rs b/src/bert.rs index e527fc3..2648038 100644 --- a/src/bert.rs +++ b/src/bert.rs @@ -62,6 +62,7 @@ aml_as_bytes!(BERT); #[cfg(test)] mod tests { + use alloc::vec::Vec; use super::*; #[test] diff --git a/src/fadt.rs b/src/fadt.rs index 3820995..1008b37 100644 --- a/src/fadt.rs +++ b/src/fadt.rs @@ -245,6 +245,7 @@ impl FADTBuilder { #[cfg(test)] mod test { + use alloc::vec::Vec; use super::{FADTBuilder, Flags, PmProfile}; use crate::Aml; diff --git a/src/hmat.rs b/src/hmat.rs index 8c3baf6..5098132 100644 --- a/src/hmat.rs +++ b/src/hmat.rs @@ -357,7 +357,6 @@ impl Aml for MemorySideCache { #[cfg(test)] mod tests { use super::*; - use crate::Aml; fn check_checksum(hmat: &HMAT) { let mut bytes = Vec::new(); diff --git a/src/lib.rs b/src/lib.rs index 1440480..91722e1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ // #![crate_type = "staticlib"] -#![cfg_attr(not(test), no_std)] +#![no_std] //! ACPI table generation. diff --git a/src/madt.rs b/src/madt.rs index edbc2be..a24eec4 100644 --- a/src/madt.rs +++ b/src/madt.rs @@ -649,7 +649,6 @@ aml_as_bytes!(PLIC); #[cfg(test)] mod tests { use super::*; - use crate::Aml; fn check_checksum(madt: &MADT) { let mut bytes = Vec::new(); diff --git a/src/rhct.rs b/src/rhct.rs index 7d4ac8a..507f575 100644 --- a/src/rhct.rs +++ b/src/rhct.rs @@ -335,7 +335,6 @@ impl Aml for MmuNode { #[cfg(test)] mod tests { use super::*; - use crate::Aml; #[test] fn test_rhct() { diff --git a/src/rimt.rs b/src/rimt.rs index 839df9a..7c816cc 100644 --- a/src/rimt.rs +++ b/src/rimt.rs @@ -492,6 +492,7 @@ impl Aml for Platform { #[cfg(test)] mod tests { + use alloc::vec; use super::*; fn rimt() -> RIMT { diff --git a/src/spcr.rs b/src/spcr.rs index db0d44a..0c421c8 100644 --- a/src/spcr.rs +++ b/src/spcr.rs @@ -167,6 +167,7 @@ impl SerialPortInfo { #[cfg(test)] mod tests { + use alloc::vec::Vec; use super::*; #[test] diff --git a/src/tpm2.rs b/src/tpm2.rs index c21de4e..d351daf 100644 --- a/src/tpm2.rs +++ b/src/tpm2.rs @@ -304,6 +304,7 @@ impl Aml for Tpm2 { #[cfg(test)] mod tests { + use alloc::vec::Vec; use super::*; use crate::gas; diff --git a/src/xsdt.rs b/src/xsdt.rs index 0eb5b59..0c551dd 100644 --- a/src/xsdt.rs +++ b/src/xsdt.rs @@ -72,6 +72,7 @@ impl Aml for XSDT { #[cfg(test)] mod tests { + use alloc::vec::Vec; use super::XSDT; use crate::Aml;