Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
dylni committed Dec 17, 2022
1 parent f6c8e4e commit 2a53983
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down
13 changes: 9 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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** -
Expand Down Expand Up @@ -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.
/// <div style="background:rgba(255,181,77,0.16); padding:0.75em;">
/// <strong>Warning</strong>: Documentation for <code>SHGetFileInfoW</code>
/// has this note:
/// <blockquote style="margin: 1em 2em 0.5em;">
/// You should call this function from a background thread. Failure to do
/// so could cause the UI to stop responding.
/// </blockquote>
/// </div>
///
/// # Panics
///
Expand Down

0 comments on commit 2a53983

Please sign in to comment.