浏览代码

Run `cargo fmt` to format code

Atul Bhosale 6 年之前
父节点
当前提交
a2350ae313
共有 6 个文件被更改,包括 13 次插入13 次删除
  1. 2 2
      src/aml/mod.rs
  2. 1 1
      src/aml/parser.rs
  3. 4 4
      src/lib.rs
  4. 4 4
      src/madt.rs
  5. 1 1
      src/rsdp_search.rs
  6. 1 1
      src/sdt.rs

+ 2 - 2
src/aml/mod.rs

@@ -7,10 +7,10 @@ pub use self::value::AmlValue;
 
 use self::parser::AmlParser;
 use self::stream::AmlStream;
-use alloc::string::String;
-use core::{mem, slice};
 use crate::sdt::SdtHeader;
 use crate::{Acpi, AcpiError, AcpiHandler, PhysicalMapping};
+use alloc::string::String;
+use core::{mem, slice};
 
 /// Represents a table containing AML. For ACPI Version 2+, this is just the DSDT and SSDTs.
 /// Version 1.0 may also have a PSDT.

+ 1 - 1
src/aml/parser.rs

@@ -1,10 +1,10 @@
 use super::stream::AmlStream;
 use super::value::{AmlValue, FieldFlags, RegionSpace};
 use super::{opcodes, AmlError};
+use crate::{Acpi, AcpiHandler};
 use alloc::string::String;
 use bit_field::BitField;
 use core::str;
-use crate::{Acpi, AcpiHandler};
 
 /// This is used internally by the parser to keep track of what we know about a field before we can
 /// add it to the namespace.

+ 4 - 4
src/lib.rs

@@ -26,14 +26,14 @@ pub use crate::aml::AmlError;
 pub use crate::madt::MadtError;
 pub use crate::rsdp_search::search_for_rsdp_bios;
 
-use alloc::{collections::BTreeMap, string::String, vec::Vec};
 use crate::aml::AmlValue;
-use core::mem;
-use core::ops::Deref;
-use core::ptr::NonNull;
 use crate::interrupt::InterruptModel;
 use crate::rsdp::Rsdp;
 use crate::sdt::SdtHeader;
+use alloc::{collections::BTreeMap, string::String, vec::Vec};
+use core::mem;
+use core::ops::Deref;
+use core::ptr::NonNull;
 
 #[derive(Debug)]
 // TODO: manually implement Debug to print signatures correctly etc.

+ 4 - 4
src/madt.rs

@@ -1,12 +1,12 @@
-use alloc::vec::Vec;
-use bit_field::BitField;
-use core::marker::PhantomData;
-use core::mem;
 use crate::interrupt::{
     InterruptModel, InterruptSourceOverride, IoApic, NmiSource, Polarity, TriggerMode,
 };
 use crate::sdt::SdtHeader;
 use crate::{Acpi, AcpiError, AcpiHandler, PhysicalMapping, Processor, ProcessorState};
+use alloc::vec::Vec;
+use bit_field::BitField;
+use core::marker::PhantomData;
+use core::mem;
 
 #[derive(Debug)]
 pub enum MadtError {

+ 1 - 1
src/rsdp_search.rs

@@ -1,7 +1,7 @@
-use core::{mem, ops::RangeInclusive};
 use crate::rsdp::Rsdp;
 use crate::Acpi;
 use crate::{parse_validated_rsdp, AcpiError, AcpiHandler};
+use core::{mem, ops::RangeInclusive};
 
 /// The pointer to the EBDA (Extended Bios Data Area) start segment pointer
 const EBDA_START_SEGMENT_PTR: usize = 0x40e;

+ 1 - 1
src/sdt.rs

@@ -1,8 +1,8 @@
-use core::{mem, str};
 use crate::fadt::Fadt;
 use crate::hpet::Hpet;
 use crate::madt::Madt;
 use crate::{Acpi, AcpiError, AcpiHandler};
+use core::{mem, str};
 
 /// All SDTs share the same header, and are `length` bytes long. The signature tells us which SDT
 /// this is.