From f497086f28a7082530b711dc069b89a7455f387d Mon Sep 17 00:00:00 2001 From: Ed Page Date: Sat, 4 Aug 2018 12:37:41 -0600 Subject: [PATCH] docs: Fix bugs Fixes #26 --- src/assert.rs | 7 +++++-- src/fs.rs | 15 +++------------ 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/assert.rs b/src/assert.rs index d79844b..61e5f05 100644 --- a/src/assert.rs +++ b/src/assert.rs @@ -57,7 +57,7 @@ use fs; /// - See [`IntoPathPredicate`] for other built-in conversions. /// /// [`TempDir`]: ../struct.TempDir.html -/// [`predicates::prelude`]: https://docs.rs/predicates/0.9.0/predicates/prelude +/// [`predicates::prelude`]: https://docs.rs/predicates/0.9.0/predicates/prelude/ /// [`IntoPathPredicate`]: trait.IntoPathPredicate.html pub trait PathAssert { /// Wrap with an interface for that provides assertions on the `TempDir`. @@ -100,7 +100,10 @@ where } } -/// Used by `PathAssert` to convert Self into the needed `Predicate`. +/// Used by [`PathAssert`] to convert Self into the needed [`Predicate`]. +/// +/// [`PathAssert`]: trait.PathAssert.html +/// [`Predicate`]: https://docs.rs/predicates-core/0.9.0/predicates_core/trait.Predicate.html pub trait IntoPathPredicate

where P: predicates_core::Predicate, diff --git a/src/fs.rs b/src/fs.rs index 82cf778..72491a5 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -9,17 +9,6 @@ use tempfile; use errors; use errors::ResultChainExt; -/// A filesystem scratchpad for tests to manipulate. -/// -/// # Examples -/// -/// ```rust -/// use assert_fs::prelude::*; -/// -/// let temp = assert_fs::TempDir::new().unwrap(); -/// temp.copy_from(".", &["*.rs"]).unwrap(); -/// temp.close().unwrap(); -/// ``` pub use tempfile::TempDir; /// Access paths within [`TempDir`] for testing. @@ -64,7 +53,7 @@ impl PathChild for tempfile::TempDir { } } -/// A path within a `TempDir` +/// A path within a [`TempDir`] /// /// See Trait Implementations. /// @@ -82,6 +71,8 @@ impl PathChild for tempfile::TempDir { /// /// temp.close().unwrap(); /// ``` +/// +/// [`TempDir`]: struct.TempDir.html pub struct ChildPath { path: path::PathBuf, }