Skip to content

Commit b14a7aa

Browse files
committed
Remove now-redundant documentation URLs.
1 parent 03e86d5 commit b14a7aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+35
-653
lines changed

cap-async-std/src/fs/dir.rs

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use {
3737
/// absolute paths don't interoperate well with the capability model.
3838
///
3939
/// [functions in `async_std::fs`]: https://docs.rs/async-std/latest/async_std/fs/index.html#functions
40-
/// [`async_std::fs::File`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html
4140
pub struct Dir {
4241
std_file: fs::File,
4342
}
@@ -67,8 +66,6 @@ impl Dir {
6766
///
6867
/// This corresponds to [`async_std::fs::File::open`], but only accesses paths
6968
/// relative to `self`.
70-
///
71-
/// [`async_std::fs::File::open`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.open
7269
#[inline]
7370
pub fn open<P: AsRef<Path>>(&self, path: P) -> io::Result<File> {
7471
self.open_with(path, OpenOptions::new().read(true))
@@ -80,8 +77,6 @@ impl Dir {
8077
///
8178
/// Instead of being a method on `OpenOptions`, this is a method on `Dir`,
8279
/// and it only accesses paths relative to `self`.
83-
///
84-
/// [`async_std::fs::OpenOptions::open`]: https://docs.rs/async-std/latest/async_std/fs/struct.OpenOptions.html#method.open
8580
#[inline]
8681
pub fn open_with<P: AsRef<Path>>(&self, path: P, options: &OpenOptions) -> io::Result<File> {
8782
let file = self.std_file.as_file_view();
@@ -112,8 +107,6 @@ impl Dir {
112107
///
113108
/// This corresponds to [`async_std::fs::create_dir`], but only accesses paths
114109
/// relative to `self`.
115-
///
116-
/// [`async_std::fs::create_dir`]: https://docs.rs/async-std/latest/async_std/fs/fn.create_dir.html
117110
#[inline]
118111
pub fn create_dir<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
119112
self._create_dir_one(path.as_ref(), &DirOptions::new())
@@ -123,8 +116,6 @@ impl Dir {
123116
///
124117
/// This corresponds to [`async_std::fs::create_dir_all`], but only accesses paths
125118
/// relative to `self`.
126-
///
127-
/// [`async_std::fs::create_dir_all`]: https://docs.rs/async-std/latest/async_std/fs/fn.create_dir_all.html
128119
#[inline]
129120
pub fn create_dir_all<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
130121
self._create_dir_all(path.as_ref(), &DirOptions::new())
@@ -133,8 +124,6 @@ impl Dir {
133124
/// Creates the specified directory with the options configured in this builder.
134125
///
135126
/// This corresponds to [`async_std::fs::DirBuilder::create`].
136-
///
137-
/// [`async_std::fs::DirBuilder::create`]: https://docs.rs/async-std/latest/async_std/fs/struct.DirBuilder.html#method.create
138127
#[inline]
139128
pub fn create_dir_with<P: AsRef<Path>>(
140129
&self,
@@ -185,8 +174,6 @@ impl Dir {
185174
///
186175
/// This corresponds to [`async_std::fs::File::create`], but only accesses paths
187176
/// relative to `self`.
188-
///
189-
/// [`async_std::fs::File::create`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.create
190177
#[inline]
191178
pub fn create<P: AsRef<Path>>(&self, path: P) -> io::Result<File> {
192179
self.open_with(
@@ -200,8 +187,6 @@ impl Dir {
200187
///
201188
/// This corresponds to [`async_std::fs::canonicalize`], but instead of returning an
202189
/// absolute path, returns a path relative to the directory represented by `self`.
203-
///
204-
/// [`async_std::fs::canonicalize`]: https://docs.rs/async-std/latest/async_std/fs/fn.canonicalize.html
205190
#[inline]
206191
pub fn canonicalize<P: AsRef<Path>>(&self, path: P) -> io::Result<PathBuf> {
207192
let file = self.std_file.as_file_view();
@@ -213,8 +198,6 @@ impl Dir {
213198
///
214199
/// This corresponds to [`async_std::fs::copy`], but only accesses paths
215200
/// relative to `self`.
216-
///
217-
/// [`async_std::fs::copy`]: https://docs.rs/async-std/latest/async_std/fs/fn.copy.html
218201
#[inline]
219202
pub async fn copy<P: AsRef<Path>, Q: AsRef<Path>>(
220203
&self,
@@ -236,8 +219,6 @@ impl Dir {
236219
///
237220
/// This corresponds to [`async_std::fs::hard_link`], but only accesses paths
238221
/// relative to `self`.
239-
///
240-
/// [`async_std::fs::hard_link`]: https://docs.rs/async-std/latest/async_std/fs/fn.hard_link.html
241222
#[inline]
242223
pub fn hard_link<P: AsRef<Path>, Q: AsRef<Path>>(
243224
&self,
@@ -259,8 +240,6 @@ impl Dir {
259240
///
260241
/// This corresponds to [`async_std::fs::metadata`], but only accesses paths
261242
/// relative to `self`.
262-
///
263-
/// [`async_std::fs::metadata`]: https://docs.rs/async-std/latest/async_std/fs/fn.metadata.html
264243
#[inline]
265244
pub fn metadata<P: AsRef<Path>>(&self, path: P) -> io::Result<Metadata> {
266245
let file = self.std_file.as_file_view();
@@ -278,8 +257,6 @@ impl Dir {
278257
///
279258
/// This corresponds to [`async_std::fs::read_dir`], but only accesses paths
280259
/// relative to `self`.
281-
///
282-
/// [`async_std::fs::read_dir`]: https://docs.rs/async-std/latest/async_std/fs/fn.read_dir.html
283260
#[inline]
284261
pub fn read_dir<P: AsRef<Path>>(&self, path: P) -> io::Result<ReadDir> {
285262
let file = self.std_file.as_file_view();
@@ -290,8 +267,6 @@ impl Dir {
290267
///
291268
/// This corresponds to [`async_std::fs::read`], but only accesses paths
292269
/// relative to `self`.
293-
///
294-
/// [`async_std::fs::read`]: https://docs.rs/async-std/latest/async_std/fs/fn.read.html
295270
#[inline]
296271
pub async fn read<P: AsRef<Path>>(&self, path: P) -> io::Result<Vec<u8>> {
297272
use async_std::prelude::*;
@@ -305,8 +280,6 @@ impl Dir {
305280
///
306281
/// This corresponds to [`async_std::fs::read_link`], but only accesses paths
307282
/// relative to `self`.
308-
///
309-
/// [`async_std::fs::read_link`]: https://docs.rs/async-std/latest/async_std/fs/fn.read_link.html
310283
#[inline]
311284
pub fn read_link<P: AsRef<Path>>(&self, path: P) -> io::Result<PathBuf> {
312285
let file = self.std_file.as_file_view();
@@ -317,8 +290,6 @@ impl Dir {
317290
///
318291
/// This corresponds to [`async_std::fs::read_to_string`], but only accesses paths
319292
/// relative to `self`.
320-
///
321-
/// [`async_std::fs::read_to_string`]: https://docs.rs/async-std/latest/async_std/fs/fn.read_to_string.html
322293
#[inline]
323294
pub async fn read_to_string<P: AsRef<Path>>(&self, path: P) -> io::Result<String> {
324295
use async_std::prelude::*;
@@ -331,8 +302,6 @@ impl Dir {
331302
///
332303
/// This corresponds to [`async_std::fs::remove_dir`], but only accesses paths
333304
/// relative to `self`.
334-
///
335-
/// [`async_std::fs::remove_dir`]: https://docs.rs/async-std/latest/async_std/fs/fn.remove_dir.html
336305
#[inline]
337306
pub fn remove_dir<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
338307
let file = self.std_file.as_file_view();
@@ -343,8 +312,6 @@ impl Dir {
343312
///
344313
/// This corresponds to [`async_std::fs::remove_dir_all`], but only accesses paths
345314
/// relative to `self`.
346-
///
347-
/// [`async_std::fs::remove_dir_all`]: https://docs.rs/async-std/latest/async_std/fs/fn.remove_dir_all.html
348315
#[inline]
349316
pub async fn remove_dir_all<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
350317
let file = self.std_file.as_file_view();
@@ -376,8 +343,6 @@ impl Dir {
376343
///
377344
/// This corresponds to [`async_std::fs::remove_file`], but only accesses paths
378345
/// relative to `self`.
379-
///
380-
/// [`async_std::fs::remove_file`]: https://docs.rs/async-std/latest/async_std/fs/fn.remove_file.html
381346
#[inline]
382347
pub fn remove_file<P: AsRef<Path>>(&self, path: P) -> io::Result<()> {
383348
let file = self.std_file.as_file_view();
@@ -388,8 +353,6 @@ impl Dir {
388353
///
389354
/// This corresponds to [`async_std::fs::rename`], but only accesses paths
390355
/// relative to `self`.
391-
///
392-
/// [`async_std::fs::rename`]: https://docs.rs/async-std/latest/async_std/fs/fn.rename.html
393356
#[inline]
394357
pub fn rename<P: AsRef<Path>, Q: AsRef<Path>>(
395358
&self,
@@ -412,8 +375,6 @@ impl Dir {
412375
/// This corresponds to [`async_std::fs::set_permissions`], but only accesses paths
413376
/// relative to `self`. Also, on some platforms, this function may fail if the
414377
/// file or directory cannot be opened for reading or writing first.
415-
///
416-
/// [`async_std::fs::set_permissions`]: https://docs.rs/async-std/latest/async_std/fs/fn.set_permissions.html
417378
pub fn set_permissions<P: AsRef<Path>>(&self, path: P, perm: Permissions) -> io::Result<()> {
418379
let file = self.std_file.as_file_view();
419380
set_permissions(&file, path.as_ref().as_ref(), perm)
@@ -423,8 +384,6 @@ impl Dir {
423384
///
424385
/// This corresponds to [`async_std::fs::symlink_metadata`], but only accesses paths
425386
/// relative to `self`.
426-
///
427-
/// [`async_std::fs::symlink_metadata`]: https://docs.rs/async-std/latest/async_std/fs/fn.symlink_metadata.html
428387
#[inline]
429388
pub fn symlink_metadata<P: AsRef<Path>>(&self, path: P) -> io::Result<Metadata> {
430389
let file = self.std_file.as_file_view();
@@ -435,8 +394,6 @@ impl Dir {
435394
///
436395
/// This corresponds to [`async_std::fs::write`], but only accesses paths
437396
/// relative to `self`.
438-
///
439-
/// [`async_std::fs::write`]: https://docs.rs/async-std/latest/async_std/fs/fn.write.html
440397
#[inline]
441398
pub async fn write<P: AsRef<Path>, C: AsRef<[u8]>>(
442399
&self,
@@ -593,8 +550,6 @@ impl Dir {
593550
///
594551
/// This corresponds to [`async_std::path::Path::exists`], but only
595552
/// accesses paths relative to `self`.
596-
///
597-
/// [`async_std::path::Path::exists`]: https://docs.rs/async-std/latest/async_std/path/struct.Path.html#method.exists
598553
#[inline]
599554
pub fn exists<P: AsRef<Path>>(&self, path: P) -> bool {
600555
self.metadata(path).is_ok()
@@ -604,8 +559,6 @@ impl Dir {
604559
///
605560
/// This corresponds to [`async_std::path::Path::is_file`], but only
606561
/// accesses paths relative to `self`.
607-
///
608-
/// [`async_std::path::Path::is_file`]: https://docs.rs/async-std/latest/async_std/path/struct.Path.html#method.is_file
609562
#[inline]
610563
pub fn is_file<P: AsRef<Path>>(&self, path: P) -> bool {
611564
self.metadata(path).map(|m| m.is_file()).unwrap_or(false)
@@ -616,8 +569,6 @@ impl Dir {
616569
/// This is similar to [`async_std::path::Path::is_dir`] in that it checks if `path` relative to
617570
/// `Dir` is a directory. This function will traverse symbolic links to query information about
618571
/// the destination file. In case of broken symbolic links, this will return `false`.
619-
///
620-
/// [`async_std::path::Path::is_dir`]: https://docs.rs/async-std/latest/async_std/path/struct.Path.html#method.is_dir
621572
#[inline]
622573
pub fn is_dir<P: AsRef<Path>>(&self, path: P) -> bool {
623574
self.metadata(path).map(|m| m.is_dir()).unwrap_or(false)

cap-async-std/src/fs/dir_entry.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ use std::{ffi::OsString, fmt};
2121
/// Note that there is no `from_std` method, as `async_std::fs::DirEntry` doesn't
2222
/// provide a way to construct a `DirEntry` without opening directories by
2323
/// ambient paths.
24-
///
25-
/// [`async_std::fs::DirEntry`]: https://docs.rs/async-std/latest/async_std/fs/struct.DirEntry.html
2624
pub struct DirEntry {
2725
pub(crate) inner: cap_primitives::fs::DirEntry,
2826
}
@@ -64,8 +62,6 @@ impl DirEntry {
6462
/// Returns the metadata for the file that this entry points at.
6563
///
6664
/// This corresponds to [`async_std::fs::DirEntry::metadata`].
67-
///
68-
/// [`async_std::fs::DirEntry::metadata`]: https://docs.rs/async-std/latest/async_std/fs/struct.DirEntry.html#method.metadata
6965
#[inline]
7066
pub fn metadata(&self) -> io::Result<Metadata> {
7167
// TODO: Make this async.
@@ -75,8 +71,6 @@ impl DirEntry {
7571
/// Returns the file type for the file that this entry points at.
7672
///
7773
/// This corresponds to [`async_std::fs::DirEntry::file_type`].
78-
///
79-
/// [`async_std::fs::DirEntry::file_type`]: https://docs.rs/async-std/latest/async_std/fs/struct.DirEntry.html#method.file_type
8074
#[inline]
8175
pub async fn file_type(&self) -> io::Result<FileType> {
8276
// TODO: Make this actually async.
@@ -86,8 +80,6 @@ impl DirEntry {
8680
/// Returns the bare file name of this directory entry without any other leading path component.
8781
///
8882
/// This corresponds to [`async_std::fs::DirEntry::file_name`].
89-
///
90-
/// [`async_std::fs::DirEntry::file_name`]: https://docs.rs/async-std/latest/async_std/fs/struct.DirEntry.html#method.file_name
9183
#[inline]
9284
pub fn file_name(&self) -> OsString {
9385
self.inner.file_name()

cap-async-std/src/fs/file.rs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ use unsafe_io::AsUnsafeFile;
2222
/// a file, you must first obtain a [`Dir`] containing the path, and then call
2323
/// [`Dir::open`] or [`Dir::create`].
2424
///
25-
/// [`async_std::fs::File`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html
26-
/// [`Dir`]: struct.Dir.html
27-
/// [`Dir::open`]: struct.Dir.html#method.open
28-
/// [`Dir::create`]: struct.Dir.html#method.create
25+
/// [`Dir`]: crate::fs::Dir
26+
/// [`Dir::open`]: crate::fs::Dir::open
27+
/// [`Dir::create`]: crate::fs::Dir::create
2928
pub struct File {
3029
pub(crate) std: fs::File,
3130
}
@@ -53,8 +52,6 @@ impl File {
5352
/// Attempts to sync all OS-internal metadata to disk.
5453
///
5554
/// This corresponds to [`async_std::fs::File::sync_all`].
56-
///
57-
/// [`async_std::fs::File::sync_all`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.sync_all
5855
#[inline]
5956
pub async fn sync_all(&self) -> io::Result<()> {
6057
self.std.sync_all().await
@@ -64,8 +61,6 @@ impl File {
6461
/// file metadata to a filesystem.
6562
///
6663
/// This corresponds to [`async_std::fs::File::sync_data`].
67-
///
68-
/// [`async_std::fs::File::sync_data`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.sync_data
6964
#[inline]
7065
pub async fn sync_data(&self) -> io::Result<()> {
7166
self.std.sync_data().await
@@ -75,8 +70,6 @@ impl File {
7570
/// to become size.
7671
///
7772
/// This corresponds to [`async_std::fs::File::set_len`].
78-
///
79-
/// [`async_std::fs::File::set_len`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.set_len
8073
#[inline]
8174
pub async fn set_len(&self, size: u64) -> io::Result<()> {
8275
self.std.set_len(size).await
@@ -85,8 +78,6 @@ impl File {
8578
/// Queries metadata about the underlying file.
8679
///
8780
/// This corresponds to [`async_std::fs::File::metadata`].
88-
///
89-
/// [`async_std::fs::File::metadata`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.metadata
9081
#[inline]
9182
pub fn metadata(&self) -> io::Result<Metadata> {
9283
let sync = self.std.as_file_view();
@@ -98,8 +89,6 @@ impl File {
9889
/// Changes the permissions on the underlying file.
9990
///
10091
/// This corresponds to [`async_std::fs::File::set_permissions`].
101-
///
102-
/// [`async_std::fs::File::set_permissions`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html#method.set_permissions
10392
#[inline]
10493
pub async fn set_permissions(&self, perm: Permissions) -> io::Result<()> {
10594
let sync = self.std.as_file_view();

cap-async-std/src/fs/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@
2121
//! `canonicalize`, `read_link`, `read_dir`, `metadata`, and `symlink_metadata`
2222
//! functions.
2323
//!
24-
//! [`async_std::fs`]: https://docs.rs/async-std/latest/async_std/fs/
2524
//! [`async_std::fs`'s free functions]: https://docs.rs/async-std/latest/async_std/fs/#functions
26-
//! [`async_std::fs::File`]: https://docs.rs/async-std/latest/async_std/fs/struct.File.html
27-
//! [`Dir`]: struct.Dir.html
2825
2926
mod dir;
3027
mod dir_entry;

cap-async-std/src/fs/read_dir.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ use std::fmt;
99
/// Note that there is no `from_std` method, as `async_std::fs::ReadDir` doesn't
1010
/// provide a way to construct a `ReadDir` without opening directories by
1111
/// ambient paths.
12-
///
13-
/// [`async_std::fs::ReadDir`]: https://docs.rs/async-std/latest/async_std/fs/struct.ReadDir.html
1412
pub struct ReadDir {
1513
pub(crate) inner: cap_primitives::fs::ReadDir,
1614
}

0 commit comments

Comments
 (0)