Răsfoiți Sursa

Move the `aml` crate to the 2021 Edition

Easy change while we're here
Isaac Woods 1 an în urmă
părinte
comite
35ac783914
5 a modificat fișierele cu 3 adăugiri și 6 ștergeri
  1. 1 1
      aml/Cargo.toml
  2. 1 1
      aml/src/expression.rs
  3. 1 1
      aml/src/parser.rs
  4. 0 1
      aml/src/pci_routing.rs
  5. 0 2
      aml/src/value.rs

+ 1 - 1
aml/Cargo.toml

@@ -7,7 +7,7 @@ description = "Library for parsing AML"
 categories = ["hardware-support", "no-std"]
 readme = "../README.md"
 license = "MIT/Apache-2.0"
-edition = "2018"
+edition = "2021"
 
 [dependencies]
 log = "0.4"

+ 1 - 1
aml/src/expression.rs

@@ -15,7 +15,7 @@ use alloc::{
     vec,
     vec::Vec,
 };
-use core::{cmp::Ordering, convert::TryInto, mem, ops::Deref};
+use core::{cmp::Ordering, mem, ops::Deref};
 
 pub fn expression_opcode<'a, 'c>() -> impl Parser<'a, 'c, AmlValue>
 where

+ 1 - 1
aml/src/parser.rs

@@ -1,6 +1,6 @@
 use crate::{pkg_length::PkgLength, AmlContext, AmlError, AmlValue, DebugVerbosity};
 use alloc::vec::Vec;
-use core::{convert::TryInto, marker::PhantomData};
+use core::marker::PhantomData;
 use log::trace;
 
 /// This is the number of spaces added to indent a scope when printing parser debug messages.

+ 0 - 1
aml/src/pci_routing.rs

@@ -9,7 +9,6 @@ use crate::{
 };
 use alloc::vec::Vec;
 use bit_field::BitField;
-use core::convert::TryInto;
 
 pub use crate::resource::IrqDescriptor;
 

+ 0 - 2
aml/src/value.rs

@@ -642,8 +642,6 @@ impl Args {
     pub const EMPTY: Self = Self([None, None, None, None, None, None, None]);
 
     pub fn from_list(list: Vec<AmlValue>) -> Result<Args, AmlError> {
-        use core::convert::TryInto;
-
         if list.len() > 7 {
             return Err(AmlError::TooManyArgs);
         }