From 2a539835e5ea17b0fbd08afd96b127f742bd8115 Mon Sep 17 00:00:00 2001 From: dylni <46035563+dylni@users.noreply.github.com> Date: Sat, 17 Dec 2022 11:32:22 -0500 Subject: [PATCH] Improve documentation --- src/base.rs | 8 ++++++-- src/lib.rs | 13 +++++++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/base.rs b/src/base.rs index f793105..a9ca9ee 100644 --- a/src/base.rs +++ b/src/base.rs @@ -19,7 +19,7 @@ use super::error::ParentError; use super::normalize; use super::PathExt; -/// A path that has a [prefix] on Windows. +/// A borrowed path that has a [prefix] on Windows. /// /// Note that comparison traits such as [`PartialEq`] will compare paths /// literally instead of comparing components. The former is more efficient and @@ -467,7 +467,11 @@ impl ToOwned for BasePath { } } -/// An owned [`BasePath`]. +/// An owned path that has a [prefix] on Windows. +/// +/// For more information, see [`BasePath`]. +/// +/// [prefix]: ::std::path::Prefix #[derive(Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] pub struct BasePathBuf(pub(super) OsString); diff --git a/src/lib.rs b/src/lib.rs index 584f20a..c86be68 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -32,7 +32,7 @@ //! [`BasePathBuf`]. //! //! - **serde** - -//! Provides implementations of [`serde::Deserialize`] and +//! Provides implementations of [`serde::Deserialize`] and/or //! [`serde::Serialize`] for [`BasePath`] and [`BasePathBuf`]. //! //! - **uniquote** - @@ -144,9 +144,14 @@ pub trait PathExt: private::Sealed { /// However, the implementation is subject to change. This section is only /// informative. /// - /// Documentation for `SHGetFileInfoW` has this note: - /// > You should call this function from a background thread. Failure to do - /// > so could cause the UI to stop responding. + ///
+ /// Warning: Documentation for SHGetFileInfoW + /// has this note: + ///
+ /// You should call this function from a background thread. Failure to do + /// so could cause the UI to stop responding. + ///
+ ///
/// /// # Panics ///