Fix typos in API documentation

This commit is contained in:
Jianfeng Jiang
2024-05-30 11:25:58 +00:00
committed by Tate, Hongliang Tian
parent 6e59617fc7
commit 33a7da9991
65 changed files with 415 additions and 323 deletions

View File

@ -4,6 +4,7 @@ use proc_macro::TokenStream;
use quote::quote;
use syn::{parse_macro_input, ItemFn};
/// The kernel entry point.
#[proc_macro_attribute]
pub fn aster_main(_attr: TokenStream, item: TokenStream) -> TokenStream {
let main_fn = parse_macro_input!(item as ItemFn);

View File

@ -115,7 +115,7 @@ impl IdAlloc {
/// Releases the consecutive range of allocated `id`s.
///
/// # Panic
/// # Panics
///
/// If the `range` is out of bounds, this method will panic.
pub fn free_consecutive(&mut self, range: Range<usize>) {
@ -136,7 +136,7 @@ impl IdAlloc {
/// Releases the allocated `id`.
///
/// # Panic
/// # Panics
///
/// If the `id` is out of bounds, this method will panic.
pub fn free(&mut self, id: usize) {
@ -153,7 +153,7 @@ impl IdAlloc {
/// If the ID is already allocated, it returns `None`, otherwise it
/// returns the allocated ID.
///
/// # Panic
/// # Panics
///
/// If the `id` is out of bounds, this method will panic.
pub fn alloc_specific(&mut self, id: usize) -> Option<usize> {
@ -171,7 +171,7 @@ impl IdAlloc {
/// Returns true if the `id` is allocated.
///
/// # Panic
/// # Panics
///
/// If the `id` is out of bounds, this method will panic.
pub fn is_allocated(&self, id: usize) -> bool {