Skip to content

acpi_tables: Fix clippy warnings related to no_std and prelude imports #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/aml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1698,7 +1698,7 @@ impl<'a> Aml for PowerResource<'a> {
#[cfg(test)]
mod tests {
use super::*;
use std::vec;
use alloc::borrow::ToOwned;

#[test]
fn test_device() {
Expand Down
1 change: 1 addition & 0 deletions src/bert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ aml_as_bytes!(BERT);
#[cfg(test)]
mod tests {
use super::*;
use alloc::vec::Vec;

#[test]
fn test_bert() {
Expand Down
1 change: 1 addition & 0 deletions src/fadt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ impl FADTBuilder {
mod test {
use super::{FADTBuilder, Flags, PmProfile};
use crate::Aml;
use alloc::vec::Vec;

#[test]
fn test_fadt() {
Expand Down
1 change: 0 additions & 1 deletion src/hmat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
//

#![crate_type = "staticlib"]
#![cfg_attr(not(test), no_std)]
#![no_std]

//! ACPI table generation.

Expand Down
1 change: 0 additions & 1 deletion src/madt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/rhct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,6 @@ impl Aml for MmuNode {
#[cfg(test)]
mod tests {
use super::*;
use crate::Aml;

#[test]
fn test_rhct() {
Expand Down
1 change: 1 addition & 0 deletions src/rimt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ impl Aml for Platform {
#[cfg(test)]
mod tests {
use super::*;
use alloc::vec;

fn rimt() -> RIMT {
RIMT::new(*b"FOOBAR", *b"CAFEDEAD", 0xdead_beef)
Expand Down
1 change: 1 addition & 0 deletions src/spcr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ impl SerialPortInfo {
#[cfg(test)]
mod tests {
use super::*;
use alloc::vec::Vec;

#[test]
fn test_sbi_spcr() {
Expand Down
1 change: 1 addition & 0 deletions src/tpm2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ impl Aml for Tpm2 {
mod tests {
use super::*;
use crate::gas;
use alloc::vec::Vec;

#[test]
fn test_client() {
Expand Down
1 change: 1 addition & 0 deletions src/xsdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ impl Aml for XSDT {
mod tests {
use super::XSDT;
use crate::Aml;
use alloc::vec::Vec;

#[test]
fn test_xsdt() {
Expand Down
Loading