Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/assert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -100,7 +100,10 @@ where
}
}

/// Used by `PathAssert` to convert Self into the needed `Predicate<Path>`.
/// Used by [`PathAssert`] to convert Self into the needed [`Predicate<Path>`].
///
/// [`PathAssert`]: trait.PathAssert.html
/// [`Predicate<Path>`]: https://docs.rs/predicates-core/0.9.0/predicates_core/trait.Predicate.html
pub trait IntoPathPredicate<P>
where
P: predicates_core::Predicate<path::Path>,
Expand Down
15 changes: 3 additions & 12 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -64,7 +53,7 @@ impl PathChild for tempfile::TempDir {
}
}

/// A path within a `TempDir`
/// A path within a [`TempDir`]
///
/// See Trait Implementations.
///
Expand All @@ -82,6 +71,8 @@ impl PathChild for tempfile::TempDir {
///
/// temp.close().unwrap();
/// ```
///
/// [`TempDir`]: struct.TempDir.html
pub struct ChildPath {
path: path::PathBuf,
}
Expand Down