Fix all spelling mistakes in history by typos tool

This commit is contained in:
Cautreoxit
2024-08-26 15:31:58 +08:00
committed by Tate, Hongliang Tian
parent b29d3b5409
commit 86f09eef75
120 changed files with 255 additions and 213 deletions

View File

@ -9,7 +9,7 @@ cargo install --path .
This will install two binaries `cargo-component` and `component-driver` at `$HOME/.cargo/bin`(by default, it depends on the cargo config).
## Usage
Use `cargo component` or `cargo component check` or `cargo component audit`. The three commands are the same now. For Asterinas, we shoud use another alias command `cargo component-check`, which was defined in `src/.cargo/config.toml`.
Use `cargo component` or `cargo component check` or `cargo component audit`. The three commands are the same now. For Asterinas, we should use another alias command `cargo component-check`, which was defined in `src/.cargo/config.toml`.
### Two notes:
- The directory **where you run the command** should contains a `Components.toml` config file, where defines all components and whitelist.

View File

@ -166,7 +166,7 @@ fn check_inline_asm_operand(
/// check whether visiting the operand in local crate is valid.
/// if the operand is invalid, add the def_path to def_paths.
/// The operand is invalid only when follwing four points are all satisfied.
/// The operand is invalid only when following four points are all satisfied.
/// 1. The operand represents a static variable or a func(the first argument can not be self or its variants).
/// 2. The operand is not defined in local crate.
/// 3. The operand is marked with #[component_access_control::controlled]

View File

@ -180,7 +180,7 @@ fn read_component_file(workspace_root: &str) -> Vec<String> {
.collect();
}
}
panic!("Componets.toml file not valid")
panic!("Components.toml file not valid")
}
/// calculate the priority of one node

View File

@ -11,7 +11,7 @@ Registering a crate as component by marking a function in the lib.rs with `#[ini
### Component initialization
Component system need to be initialized by calling `componet::init_all` function and it needs information about all components. Usually it is used with the `component::parse_metadata` macro.
Component system need to be initialized by calling `component::init_all` function and it needs information about all components. Usually it is used with the `component::parse_metadata` macro.
## Example

View File

@ -128,7 +128,7 @@ fn parse_input(components: Vec<ComponentInfo>) -> BTreeMap<String, ComponentInfo
out
}
/// Match the ComponetInfo with ComponentRegistry. The key is the relative path of one component
/// Match the ComponentInfo with ComponentRegistry. The key is the relative path of one component
fn match_and_call(
mut components: BTreeMap<String, ComponentInfo>,
) -> Result<(), ComponentSystemInitError> {
@ -161,7 +161,7 @@ fn match_and_call(
infos.push(info);
}
debug!("Remain componets:{components:?}");
debug!("Remain components:{components:?}");
if !components.is_empty() {
info!("Exists components that are not initialized");
@ -174,11 +174,11 @@ fn match_and_call(
for i in infos {
info!("Component initializing:{:?}", i);
if let Err(res) = i.function.unwrap().call(()) {
error!("Component initalize error:{:?}", res);
error!("Component initialize error:{:?}", res);
} else {
info!("Component initalize complete");
info!("Component initialize complete");
}
}
info!("All components initalization completed");
info!("All components initialization completed");
Ok(())
}