mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-26 19:03:27 +00:00
Adjust the format of imports in Asterinas
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
92e488e727
commit
cfcef6965a
@ -78,8 +78,7 @@
|
||||
use require_item::RequireItem;
|
||||
use syn::parse_macro_input;
|
||||
|
||||
use crate::require_attr::expand_require;
|
||||
use crate::require_attr::RequireAttr;
|
||||
use crate::require_attr::{expand_require, RequireAttr};
|
||||
|
||||
mod require_attr;
|
||||
mod require_item;
|
||||
|
@ -129,8 +129,9 @@ impl Mul<u32> for Coeff {
|
||||
|
||||
#[if_cfg_ktest]
|
||||
mod test {
|
||||
use super::*;
|
||||
use ktest::ktest;
|
||||
|
||||
use super::*;
|
||||
#[ktest]
|
||||
fn calculation() {
|
||||
let coeff = Coeff::new(23456, 56789, 1_000_000_000);
|
||||
|
@ -1,8 +1,9 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use bitvec::prelude::BitVec;
|
||||
use core::fmt::Debug;
|
||||
|
||||
use bitvec::prelude::BitVec;
|
||||
|
||||
/// An id allocator implemented by the bitmap.
|
||||
/// The true bit implies that the id is allocated, and vice versa.
|
||||
#[derive(Clone)]
|
||||
|
@ -1,12 +1,13 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use aster_frame::vm::Paddr;
|
||||
use aster_frame::vm::{HasPaddr, VmIo};
|
||||
use aster_frame::Result;
|
||||
use core::{fmt::Debug, marker::PhantomData};
|
||||
|
||||
use aster_frame::{
|
||||
vm::{HasPaddr, Paddr, VmIo},
|
||||
Result,
|
||||
};
|
||||
use aster_rights::{Dup, Exec, Full, Read, Signal, TRightSet, TRights, Write};
|
||||
use aster_rights_proc::require;
|
||||
use core::fmt::Debug;
|
||||
use core::marker::PhantomData;
|
||||
pub use pod::Pod;
|
||||
pub use typeflags_util::SetContain;
|
||||
|
||||
|
@ -9,14 +9,17 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::collections::BTreeMap;
|
||||
use alloc::string::{String, ToString};
|
||||
use alloc::vec::Vec;
|
||||
use alloc::{borrow::ToOwned, fmt::Debug};
|
||||
use log::{debug, error, info};
|
||||
use alloc::{
|
||||
borrow::ToOwned,
|
||||
collections::BTreeMap,
|
||||
fmt::Debug,
|
||||
string::{String, ToString},
|
||||
vec::Vec,
|
||||
};
|
||||
|
||||
pub use component_macro::*;
|
||||
pub use inventory::submit;
|
||||
use log::{debug, error, info};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ComponentInitError {
|
||||
|
@ -21,14 +21,18 @@
|
||||
|
||||
extern crate alloc;
|
||||
|
||||
use crate::error::{Error, Result};
|
||||
use alloc::string::{String, ToString};
|
||||
use alloc::vec;
|
||||
use alloc::{
|
||||
string::{String, ToString},
|
||||
vec,
|
||||
};
|
||||
use core::cmp::min;
|
||||
|
||||
use core2::io::{Read, Write};
|
||||
use int_to_c_enum::TryFromInt;
|
||||
use lending_iterator::prelude::*;
|
||||
|
||||
use crate::error::{Error, Result};
|
||||
|
||||
pub mod error;
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -1,9 +1,9 @@
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
use super::error::*;
|
||||
use super::{CpioDecoder, FileType};
|
||||
use lending_iterator::LendingIterator;
|
||||
|
||||
use super::{error::*, CpioDecoder, FileType};
|
||||
|
||||
#[test]
|
||||
fn test_decoder() {
|
||||
use std::process::{Command, Stdio};
|
||||
|
@ -109,13 +109,15 @@
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::sync::{Arc, Weak};
|
||||
use core::borrow::Borrow;
|
||||
use core::cmp::Ordering;
|
||||
use core::convert::AsRef;
|
||||
use core::fmt;
|
||||
use core::hash::{Hash, Hasher};
|
||||
use core::marker::Unsize;
|
||||
use core::ops::{CoerceUnsized, Deref};
|
||||
use core::{
|
||||
borrow::Borrow,
|
||||
cmp::Ordering,
|
||||
convert::AsRef,
|
||||
fmt,
|
||||
hash::{Hash, Hasher},
|
||||
marker::Unsize,
|
||||
ops::{CoerceUnsized, Deref},
|
||||
};
|
||||
|
||||
/// Same as the standard `Arc`, except that it can be used as the key type of a hash table.
|
||||
#[repr(transparent)]
|
||||
|
@ -2,9 +2,7 @@
|
||||
|
||||
//! Type level bools
|
||||
|
||||
pub use core::ops::BitAnd as And;
|
||||
pub use core::ops::BitOr as Or;
|
||||
pub use core::ops::Not;
|
||||
pub use core::ops::{BitAnd as And, BitOr as Or, Not};
|
||||
use core::unimplemented;
|
||||
|
||||
pub trait Bool {}
|
||||
|
@ -12,8 +12,11 @@ pub mod if_;
|
||||
pub mod same;
|
||||
pub mod set;
|
||||
|
||||
pub use crate::bool::{And, AndOp, False, IsFalse, IsTrue, Not, NotOp, Or, OrOp, True};
|
||||
pub use crate::extend::{SetExtend, SetExtendOp};
|
||||
pub use crate::same::{SameAs, SameAsOp};
|
||||
pub use crate::set::{Cons, Nil, Set, SetContain, SetContainOp, SetInclude, SetIncludeOp};
|
||||
pub use assert::AssertTypeSame;
|
||||
|
||||
pub use crate::{
|
||||
bool::{And, AndOp, False, IsFalse, IsTrue, Not, NotOp, Or, OrOp, True},
|
||||
extend::{SetExtend, SetExtendOp},
|
||||
same::{SameAs, SameAsOp},
|
||||
set::{Cons, Nil, Set, SetContain, SetContainOp, SetInclude, SetIncludeOp},
|
||||
};
|
||||
|
@ -2,15 +2,13 @@
|
||||
|
||||
//! Common types and traits to deal with type-level sets
|
||||
|
||||
use core::marker::PhantomData;
|
||||
use core::{marker::PhantomData, ops::BitOr as Or};
|
||||
|
||||
use crate::{
|
||||
if_::{If, IfOp},
|
||||
And, AndOp, False, OrOp, SameAs, SameAsOp, True,
|
||||
};
|
||||
|
||||
use core::ops::BitOr as Or;
|
||||
|
||||
/// A marker trait for type-level sets.
|
||||
pub trait Set {}
|
||||
|
||||
|
Reference in New Issue
Block a user