Skip to content

Commit 6a6f068

Browse files
author
Ed Page
committed
docs: Run intraconv
1 parent 2df8d8a commit 6a6f068

File tree

6 files changed

+24
-74
lines changed

6 files changed

+24
-74
lines changed

src/assert.rs

Lines changed: 9 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
//! temp.close().unwrap();
2121
//! ```
2222
//!
23-
//! [`PathAssert`]: trait.PathAssert.html
2423
2524
use std::fmt;
2625
use std::path;
@@ -61,9 +60,7 @@ use crate::fixture;
6160
/// temp.close().unwrap();
6261
/// ```
6362
///
64-
/// [`TempDir`]: ../struct.TempDir.html
65-
/// [`predicates`]: https://docs.rs/predicates
66-
/// [`IntoPathPredicate`]: trait.IntoPathPredicate.html
63+
/// [`TempDir`]: super::TempDir
6764
pub trait PathAssert {
6865
/// Assert the state of files within [`TempDir`].
6966
///
@@ -96,9 +93,7 @@ pub trait PathAssert {
9693
/// temp.close().unwrap();
9794
/// ```
9895
///
99-
/// [`TempDir`]: ../struct.TempDir.html
100-
/// [`predicates`]: https://docs.rs/predicates
101-
/// [`IntoPathPredicate`]: trait.IntoPathPredicate.html
96+
/// [`TempDir`]: super::TempDir
10297
fn assert<I, P>(&self, pred: I) -> &Self
10398
where
10499
I: IntoPathPredicate<P>,
@@ -149,7 +144,7 @@ where
149144
}
150145
}
151146

152-
/// Used by [`PathAssert`] to convert Self into the needed [`Predicate<Path>`].
147+
/// Used by [`PathAssert`] to convert Self into the needed [`predicates_core::Predicate<Path>`].
153148
///
154149
/// # Examples
155150
///
@@ -167,9 +162,6 @@ where
167162
///
168163
/// temp.close().unwrap();
169164
/// ```
170-
///
171-
/// [`PathAssert`]: trait.PathAssert.html
172-
/// [`Predicate<Path>`]: https://docs.rs/predicates-core/0.9.0/predicates_core/trait.Predicate.html
173165
pub trait IntoPathPredicate<P>
174166
where
175167
P: predicates_core::Predicate<path::Path>,
@@ -192,8 +184,8 @@ where
192184
}
193185
}
194186

195-
// Keep `predicates` concrete Predicates out of our public API.
196-
/// [Predicate] used by [`IntoPathPredicate`] for bytes.
187+
/// Keep `predicates` concrete Predicates out of our public API.
188+
/// [predicates_core::Predicate] used by [`IntoPathPredicate`] for bytes.
197189
///
198190
/// # Example
199191
///
@@ -210,9 +202,6 @@ where
210202
///
211203
/// temp.close().unwrap();
212204
/// ```
213-
///
214-
/// [`IntoPathPredicate`]: trait.IntoPathPredicate.html
215-
/// [Predicate]: https://docs.rs/predicates-core/1.0.0/predicates_core/trait.Predicate.html
216205
#[derive(Debug)]
217206
pub struct BytesContentPathPredicate(
218207
predicates::path::FileContentPredicate<predicates::ord::EqPredicate<&'static [u8]>>,
@@ -268,8 +257,8 @@ impl IntoPathPredicate<BytesContentPathPredicate> for &'static [u8] {
268257
}
269258
}
270259

271-
// Keep `predicates` concrete Predicates out of our public API.
272-
/// [Predicate] used by `IntoPathPredicate` for `str`.
260+
/// Keep `predicates` concrete Predicates out of our public API.
261+
/// [predicates_core::Predicate] used by `IntoPathPredicate` for `str`.
273262
///
274263
/// # Example
275264
///
@@ -286,9 +275,6 @@ impl IntoPathPredicate<BytesContentPathPredicate> for &'static [u8] {
286275
///
287276
/// temp.close().unwrap();
288277
/// ```
289-
///
290-
/// [`IntoPathPredicate`]: trait.IntoPathPredicate.html
291-
/// [Predicate]: https://docs.rs/predicates-core/1.0.0/predicates_core/trait.Predicate.html
292278
#[derive(Debug, Clone)]
293279
pub struct StrContentPathPredicate(
294280
predicates::path::FileContentPredicate<
@@ -362,8 +348,8 @@ impl<'s> IntoPathPredicate<StrContentPathPredicate> for &'s String {
362348
}
363349
}
364350

365-
// Keep `predicates` concrete Predicates out of our public API.
366-
/// [Predicate] used by `IntoPathPredicate` for `str` predicates.
351+
/// Keep `predicates` concrete Predicates out of our public API.
352+
/// [predicates_core::Predicate] used by `IntoPathPredicate` for `str` predicates.
367353
///
368354
/// # Example
369355
///
@@ -381,9 +367,6 @@ impl<'s> IntoPathPredicate<StrContentPathPredicate> for &'s String {
381367
///
382368
/// temp.close().unwrap();
383369
/// ```
384-
///
385-
/// [`IntoPathPredicate`]: trait.IntoPathPredicate.html
386-
/// [Predicate]: https://docs.rs/predicates-core/1.0.0/predicates_core/trait.Predicate.html
387370
#[derive(Debug, Clone)]
388371
pub struct StrPathPredicate<P: predicates_core::Predicate<str>>(
389372
predicates::path::FileContentPredicate<predicates::str::Utf8Predicate<P>>,

src/fixture/child.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ use std::path;
1313
/// temp.close().unwrap();
1414
/// ```
1515
///
16-
/// [`TempDir`]: struct.TempDir.html
17-
/// [`ChildPath`]: struct.ChildPath.html
1816
pub trait PathChild {
1917
/// Access a path within the temp directory.
2018
///
@@ -70,7 +68,6 @@ impl PathChild for ChildPath {
7068
/// temp.close().unwrap();
7169
/// ```
7270
///
73-
/// [`TempDir`]: struct.TempDir.html
7471
pub struct ChildPath {
7572
path: path::PathBuf,
7673
}
@@ -80,7 +77,6 @@ impl ChildPath {
8077
///
8178
/// See trait implementations or [`PathChild`] for more details.
8279
///
83-
/// [`PathChild`]: trait.PathChild.html
8480
pub fn new<P>(path: P) -> Self
8581
where
8682
P: Into<path::PathBuf>,

src/fixture/dir.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ use super::errors::*;
4949
/// tmp_dir.close().unwrap();
5050
/// ```
5151
///
52-
/// [`File`]: http://doc.rust-lang.org/std/fs/struct.File.html
53-
/// [`Path`]: http://doc.rust-lang.org/std/path/struct.Path.html
54-
/// [`ReadDir`]: http://doc.rust-lang.org/std/fs/struct.ReadDir.html
55-
/// [`TempDir::close()`]: struct.TempDir.html#method.close
56-
/// [`TempDir::new()`]: struct.TempDir.html#method.new
57-
/// [`TempDir::path()`]: struct.TempDir.html#method.path
58-
/// [`TempDir`]: struct.TempDir.html
59-
/// [`std::env::temp_dir()`]: https://doc.rust-lang.org/std/env/fn.temp_dir.html
60-
/// [`std::fs`]: http://doc.rust-lang.org/std/fs/index.html
61-
/// [`std::process::exit()`]: http://doc.rust-lang.org/std/process/fn.exit.html
52+
/// [`File`]: std::fs::File
53+
/// [`Path`]: std::path::Path
54+
/// [`ReadDir`]: std::fs::ReadDir
6255
pub struct TempDir {
6356
temp: Inner,
6457
}
@@ -145,7 +138,7 @@ impl TempDir {
145138

146139
/// Accesses the [`Path`] to the temporary directory.
147140
///
148-
/// [`Path`]: http://doc.rust-lang.org/std/path/struct.Path.html
141+
/// [`Path`]: std::path::Path
149142
///
150143
/// # Examples
151144
///
@@ -179,7 +172,6 @@ impl TempDir {
179172
/// as well as from deleting the temporary directory itself. These errors
180173
/// may be platform specific.
181174
///
182-
/// [`std::io::Error`]: http://doc.rust-lang.org/std/io/struct.Error.html
183175
///
184176
/// # Examples
185177
///

src/fixture/file.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,16 +49,9 @@ use super::errors::*;
4949
/// tmp_file.close().unwrap();
5050
/// ```
5151
///
52-
/// [`File`]: http://doc.rust-lang.org/std/fs/struct.File.html
53-
/// [`Path`]: http://doc.rust-lang.org/std/path/struct.Path.html
54-
/// [`ReadDir`]: http://doc.rust-lang.org/std/fs/struct.ReadDir.html
55-
/// [`NamedTempFile::close()`]: struct.NamedTempFile.html#method.close
56-
/// [`NamedTempFile::new()`]: struct.NamedTempFile.html#method.new
57-
/// [`NamedTempFile::path()`]: struct.NamedTempFile.html#method.path
58-
/// [`NamedTempFile`]: struct.NamedTempFile.html
59-
/// [`std::env::temp_dir()`]: https://doc.rust-lang.org/std/env/fn.temp_dir.html
60-
/// [`std::fs`]: http://doc.rust-lang.org/std/fs/index.html
61-
/// [`std::process::exit()`]: http://doc.rust-lang.org/std/process/fn.exit.html
52+
/// [`File`]: std::fs::File
53+
/// [`Path`]: std::path::Path
54+
/// [`ReadDir`]: std::fs::ReadDir
6255
pub struct NamedTempFile {
6356
temp: Inner,
6457
path: path::PathBuf,
@@ -151,7 +144,7 @@ impl NamedTempFile {
151144

152145
/// Accesses the [`Path`] to the temporary file.
153146
///
154-
/// [`Path`]: http://doc.rust-lang.org/std/path/struct.Path.html
147+
/// [`Path`]: std::path::Path
155148
///
156149
/// # Examples
157150
///
@@ -180,7 +173,6 @@ impl NamedTempFile {
180173
/// This function may return a variety of [`std::io::Error`]s that result from deleting the
181174
/// temporary file and parent directory, These errors may be platform specific.
182175
///
183-
/// [`std::io::Error`]: http://doc.rust-lang.org/std/io/struct.Error.html
184176
///
185177
/// # Examples
186178
///

src/fixture/tools.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use super::TempDir;
1313

1414
/// Create empty directories at [`ChildPath`].
1515
///
16-
/// [`ChildPath`]: struct.ChildPath.html
1716
pub trait PathCreateDir {
1817
/// Create an empty file at [`ChildPath`].
1918
///
@@ -27,7 +26,6 @@ pub trait PathCreateDir {
2726
/// temp.close().unwrap();
2827
/// ```
2928
///
30-
/// [`ChildPath`]: struct.ChildPath.html
3129
fn create_dir_all(&self) -> Result<(), FixtureError>;
3230
}
3331

@@ -39,7 +37,6 @@ impl PathCreateDir for ChildPath {
3937

4038
/// Create empty files at [`ChildPath`].
4139
///
42-
/// [`ChildPath`]: struct.ChildPath.html
4340
pub trait FileTouch {
4441
/// Create an empty file at [`ChildPath`].
4542
///
@@ -53,7 +50,6 @@ pub trait FileTouch {
5350
/// temp.close().unwrap();
5451
/// ```
5552
///
56-
/// [`ChildPath`]: struct.ChildPath.html
5753
fn touch(&self) -> Result<(), FixtureError>;
5854
}
5955

@@ -71,7 +67,6 @@ impl FileTouch for NamedTempFile {
7167

7268
/// Write a binary file at [`ChildPath`].
7369
///
74-
/// [`ChildPath`]: struct.ChildPath.html
7570
pub trait FileWriteBin {
7671
/// Write a binary file at [`ChildPath`].
7772
///
@@ -88,7 +83,6 @@ pub trait FileWriteBin {
8883
/// temp.close().unwrap();
8984
/// ```
9085
///
91-
/// [`ChildPath`]: struct.ChildPath.html
9286
fn write_binary(&self, data: &[u8]) -> Result<(), FixtureError>;
9387
}
9488

@@ -106,7 +100,6 @@ impl FileWriteBin for NamedTempFile {
106100

107101
/// Write a text file at [`ChildPath`].
108102
///
109-
/// [`ChildPath`]: struct.ChildPath.html
110103
pub trait FileWriteStr {
111104
/// Write a text file at [`ChildPath`].
112105
///
@@ -123,7 +116,6 @@ pub trait FileWriteStr {
123116
/// temp.close().unwrap();
124117
/// ```
125118
///
126-
/// [`ChildPath`]: struct.ChildPath.html
127119
fn write_str(&self, data: &str) -> Result<(), FixtureError>;
128120
}
129121

@@ -141,7 +133,6 @@ impl FileWriteStr for NamedTempFile {
141133

142134
/// Write (copy) a file to [`ChildPath`].
143135
///
144-
/// [`ChildPath`]: struct.ChildPath.html
145136
pub trait FileWriteFile {
146137
/// Write (copy) a file to [`ChildPath`].
147138
///
@@ -159,7 +150,6 @@ pub trait FileWriteFile {
159150
/// temp.close().unwrap();
160151
/// ```
161152
///
162-
/// [`ChildPath`]: struct.ChildPath.html
163153
fn write_file(&self, data: &path::Path) -> Result<(), FixtureError>;
164154
}
165155

@@ -177,7 +167,6 @@ impl FileWriteFile for NamedTempFile {
177167

178168
/// Copy files into [`TempDir`].
179169
///
180-
/// [`TempDir`]: struct.TempDir.html
181170
pub trait PathCopy {
182171
/// Copy files and directories into the current path from the `source` according to the glob
183172
/// `patterns`.

src/lib.rs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@
3737
//! temp.close().unwrap();
3838
//! ```
3939
//!
40-
//! [`TempDir`]: struct.TempDir.html
41-
//! [`NamedTempFile`]: struct.NamedTempFile.html
42-
//! [`ChildPath`]: fixture/struct.ChildPath.html
43-
//! [`FileTouch`]: fixture/trait.FileTouch.html
44-
//! [`FileWriteBin`]: fixture/trait.FileWriteBin.html
45-
//! [`FileWriteStr`]: fixture/trait.FileWriteStr.html
46-
//! [`FileWriteFile`]: fixture/trait.FileWriteFile.html
47-
//! [`PathCopy`]: fixture/trait.PathCopy.html
48-
//! [`PathAssert`]: assert/trait.PathAssert.html
40+
//! [`ChildPath`]: fixture::ChildPath
41+
//! [`FileTouch`]: fixture::FileTouch
42+
//! [`FileWriteBin`]: fixture::FileWriteBin
43+
//! [`FileWriteStr`]: fixture::FileWriteStr
44+
//! [`FileWriteFile`]: fixture::FileWriteFile
45+
//! [`PathCopy`]: fixture::PathCopy
46+
//! [`PathAssert`]: assert::PathAssert
4947
//! [dir-diff]: https://crates.io/crates/dir-diff
5048
5149
#![warn(missing_docs)]

0 commit comments

Comments
 (0)