From 3a1aeedb55e1c64a09fc210ce06fcc3584e76998 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 28 Oct 2024 17:15:25 +0400 Subject: [PATCH] docs(rdpdr): fix rustdoc warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- crates/ironrdp-rdpdr/src/lib.rs | 4 +--- crates/ironrdp-rdpdr/src/pdu/efs.rs | 8 ++++---- crates/ironrdp-rdpdr/src/pdu/esc/rpce.rs | 8 ++++---- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/crates/ironrdp-rdpdr/src/lib.rs b/crates/ironrdp-rdpdr/src/lib.rs index 6eeccd7b..f55b3ac0 100644 --- a/crates/ironrdp-rdpdr/src/lib.rs +++ b/crates/ironrdp-rdpdr/src/lib.rs @@ -44,7 +44,7 @@ pub struct Rdpdr { /// The name of the computer that is running the client. /// /// Any directories shared will be displayed by File Explorer - /// as " on ". + /// as "`` on ``". computer_name: String, capabilities: Capabilities, /// Pre-configured list of devices to announce to the server. @@ -60,8 +60,6 @@ impl Rdpdr { pub const NAME: ChannelName = ChannelName::from_static(b"rdpdr\0\0\0"); /// Creates a new [`Rdpdr`]. - /// - /// See [`Rdpdr::computer_name`]. pub fn new(backend: Box, computer_name: String) -> Self { Self { computer_name, diff --git a/crates/ironrdp-rdpdr/src/pdu/efs.rs b/crates/ironrdp-rdpdr/src/pdu/efs.rs index d57a4c82..96196f75 100644 --- a/crates/ironrdp-rdpdr/src/pdu/efs.rs +++ b/crates/ironrdp-rdpdr/src/pdu/efs.rs @@ -734,8 +734,8 @@ bitflags! { /// /// [Server Client ID Confirm (section 2.2.2.6)]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/bbbb9666-6994-4cf6-8e65-0d46eb319c6e /// [2.2.2.3]: https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/d6fe6d1b-c145-4a6f-99aa-4fe3cdcea398 -const VERSION_MINOR_12: u16 = 0x000C; -const VERSION_MAJOR: u16 = 0x0001; +pub const VERSION_MINOR_12: u16 = 0x000C; +pub const VERSION_MAJOR: u16 = 0x0001; /// [2.2.2.9] Client Device List Announce Request (DR_CORE_DEVICELIST_ANNOUNCE_REQ) /// and [2.2.3.1] Client Device List Announce (DR_DEVICELIST_ANNOUNCE) @@ -2707,7 +2707,7 @@ impl ClientDriveQueryDirectoryResponse { /// /// We only need to read the buffer up to the FileInformationClass to get the job done, so the rest of the fields in /// this structure are discarded. See FreeRDP: -/// https://github.com/FreeRDP/FreeRDP/blob/511444a65e7aa2f537c5e531fa68157a50c1bd4d/channels/drive/client/drive_main.c#L464 +/// /// /// [2.2.3.3.6]: https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-rdpefs/484e622d-0e2b-423c-8461-7de38878effb #[derive(Debug, PartialEq, Clone)] @@ -2756,7 +2756,7 @@ impl ServerDriveQueryVolumeInformationRequest { /// [2.5] File System Information Classes [MS-FSCC] /// -/// [2.5] https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/ee12042a-9352-46e3-9f67-c094b75fe6c3 +/// [2.5] #[derive(Debug, PartialEq, Eq, Clone)] pub struct FileSystemInformationClassLevel(u32); diff --git a/crates/ironrdp-rdpdr/src/pdu/esc/rpce.rs b/crates/ironrdp-rdpdr/src/pdu/esc/rpce.rs index ac8006c3..5f112e31 100644 --- a/crates/ironrdp-rdpdr/src/pdu/esc/rpce.rs +++ b/crates/ironrdp-rdpdr/src/pdu/esc/rpce.rs @@ -94,7 +94,7 @@ impl Pdu { } impl Pdu { - /// Decodes the instance from a buffer stripping it of its [`StreamHeader`] and [`TypeHeader`]. + /// Decodes the instance from a buffer stripping it of its headers. pub fn decode(src: &mut ReadCursor<'_>, charset: Option) -> DecodeResult> { // We expect `StreamHeader::decode`, `TypeHeader::decode`, and `T::decode` to each // call `ensure_size!` to ensure that the buffer is large enough, so we can safely @@ -146,11 +146,11 @@ pub trait Encode: ironrdp_core::Encode + Send + std::fmt::Debug {} /// /// Implementers should typically implement this trait instead of [`Encode`]. pub trait HeaderlessEncode: Send + std::fmt::Debug { - /// Encodes the instance into a buffer sans its [`StreamHeader`] and [`TypeHeader`]. + /// Encodes the instance into a buffer sans its headers. fn encode(&self, dst: &mut WriteCursor<'_>) -> EncodeResult<()>; /// Returns the name associated with this RPCE PDU. fn name(&self) -> &'static str; - /// Returns the size of the instance sans its [`StreamHeader`] and [`TypeHeader`]. + /// Returns the size of the instance sans its headers. fn size(&self) -> usize; } @@ -160,7 +160,7 @@ pub trait HeaderlessEncode: Send + std::fmt::Debug { /// and then call [`Pdu::decode`] to decode the instance. See [`Pdu`] for more /// details and an example. pub trait HeaderlessDecode: Sized { - /// Decodes the instance from a buffer sans its [`StreamHeader`] and [`TypeHeader`]. + /// Decodes the instance from a buffer sans its headers. /// /// `charset` is an optional parameter that can be used to specify the character set /// when relevant. This is useful for accounting for the "A" vs "W" variants of certain