mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-30 10:43:56 +00:00
Fix all doc warnings
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
160cb9cdb5
commit
b49e11a25e
@ -22,7 +22,7 @@ pub fn _print(args: Arguments) {
|
||||
VirtioConsolesPrinter.write_fmt(args).unwrap();
|
||||
}
|
||||
|
||||
/// Copy from Rust std: https://github.com/rust-lang/rust/blob/master/library/std/src/macros.rs
|
||||
/// Copied from Rust std: <https://github.com/rust-lang/rust/blob/master/library/std/src/macros.rs>
|
||||
#[macro_export]
|
||||
macro_rules! print {
|
||||
($($arg:tt)*) => {{
|
||||
@ -30,7 +30,7 @@ macro_rules! print {
|
||||
}};
|
||||
}
|
||||
|
||||
/// Copy from Rust std: https://github.com/rust-lang/rust/blob/master/library/std/src/macros.rs
|
||||
/// Copied from Rust std: <https://github.com/rust-lang/rust/blob/master/library/std/src/macros.rs>
|
||||
#[macro_export]
|
||||
macro_rules! println {
|
||||
() => {
|
||||
|
@ -39,7 +39,7 @@ pub trait Iface: internal::IfaceInternal + Send + Sync {
|
||||
/// Bind a socket to the iface. So the packet for this socket will be dealt with by the interface.
|
||||
/// If port is None, the iface will pick up an empheral port for the socket.
|
||||
/// FIXME: The reason for binding socket and interface together is because there are limitations inside smoltcp.
|
||||
/// See discussion at https://github.com/smoltcp-rs/smoltcp/issues/779.
|
||||
/// See discussion at <https://github.com/smoltcp-rs/smoltcp/issues/779>.
|
||||
fn bind_socket(
|
||||
&self,
|
||||
socket: Box<AnyUnboundSocket>,
|
||||
|
@ -3,7 +3,7 @@
|
||||
use crate::prelude::*;
|
||||
|
||||
/// Shutdown types
|
||||
/// From https://elixir.bootlin.com/linux/v6.0.9/source/include/linux/net.h
|
||||
/// From <https://elixir.bootlin.com/linux/v6.0.9/source/include/linux/net.h>
|
||||
#[repr(i32)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, TryFromInt)]
|
||||
#[allow(non_camel_case_types)]
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
//! This module defines the process initial stack.
|
||||
//! The process initial stack, contains arguments, environmental variables and auxiliary vectors
|
||||
//! The data layout of init stack can be seen in Figure 3.9 in https://uclibc.org/docs/psABI-x86_64.pdf
|
||||
//! The data layout of init stack can be seen in Figure 3.9 in <https://uclibc.org/docs/psABI-x86_64.pdf>
|
||||
|
||||
use core::mem;
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
//!
|
||||
//! First, the option should be added in the net module for the TCP socket.
|
||||
//!
|
||||
//! ```rust norun
|
||||
//! ```rust no_run
|
||||
//! impl_socket_option!(TcpNodelay(bool));
|
||||
//! ```
|
||||
//!
|
||||
@ -32,15 +32,19 @@
|
||||
//! in the utils module. These util functions can be shared if multiple options have the value
|
||||
//! of same type.
|
||||
//!
|
||||
//! ```rust norun
|
||||
//! impl ReadFromUser for bool { // content omitted here }
|
||||
//! impl WriteFromUser for bool { // content omitted here }
|
||||
//! ```rust compile_fail
|
||||
//! impl ReadFromUser for bool {
|
||||
//! // content omitted here
|
||||
//! }
|
||||
//! impl WriteFromUser for bool {
|
||||
//! // content omitted here
|
||||
//! }
|
||||
//! ```
|
||||
//!
|
||||
//! At last, we can implement `RawSocketOption` for `TcpNodelay` so that it can be read/from
|
||||
//! user space.
|
||||
//!
|
||||
//! ```rust norun
|
||||
//! ```rust no_run
|
||||
//! impl_raw_socket_option!(TcpNodeley);
|
||||
//! ```
|
||||
//!
|
||||
|
Reference in New Issue
Block a user