Adjust the format of imports in Asterinas

This commit is contained in:
Chen Chengjun
2024-02-25 22:09:24 +08:00
committed by Tate, Hongliang Tian
parent 92e488e727
commit cfcef6965a
384 changed files with 2264 additions and 2059 deletions

View File

@ -2,12 +2,10 @@
use std::process;
use crate::commands::utils::create_target_json;
use crate::error::Errno;
use crate::error_msg;
use crate::utils::get_cargo_metadata;
use super::utils::{cargo, COMMON_CARGO_ARGS};
use crate::{
commands::utils::create_target_json, error::Errno, error_msg, utils::get_cargo_metadata,
};
pub fn execute_check_command() {
let target_json_path = {

View File

@ -2,11 +2,10 @@
use std::process;
use crate::error_msg;
use crate::utils::get_cargo_metadata;
use crate::{commands::utils::create_target_json, error::Errno};
use super::utils::{cargo, COMMON_CARGO_ARGS};
use crate::{
commands::utils::create_target_json, error::Errno, error_msg, utils::get_cargo_metadata,
};
pub fn execute_clippy_command() {
let target_json_path = {

View File

@ -7,6 +7,6 @@ mod clippy;
mod new;
mod utils;
pub use self::check::execute_check_command;
pub use self::clippy::execute_clippy_command;
pub use self::new::execute_new_command;
pub use self::{
check::execute_check_command, clippy::execute_clippy_command, new::execute_new_command,
};

View File

@ -1,13 +1,13 @@
// SPDX-License-Identifier: MPL-2.0
use std::path::PathBuf;
use std::str::FromStr;
use std::{fs, process};
use std::{fs, path::PathBuf, process, str::FromStr};
use crate::cli::NewArgs;
use crate::error::Errno;
use crate::error_msg;
use crate::utils::{cargo_new_lib, get_cargo_metadata, ASTER_FRAME_DEP};
use crate::{
cli::NewArgs,
error::Errno,
error_msg,
utils::{cargo_new_lib, get_cargo_metadata, ASTER_FRAME_DEP},
};
pub fn execute_new_command(args: &NewArgs) {
cargo_new_lib(&args.crate_name);

View File

@ -1,8 +1,10 @@
// SPDX-License-Identifier: MPL-2.0
use std::fs;
use std::path::{Path, PathBuf};
use std::process::Command;
use std::{
fs,
path::{Path, PathBuf},
process::Command,
};
pub const COMMON_CARGO_ARGS: &[&str] = &[
"-Zbuild-std=core,alloc,compiler_builtins",