Skip to content

Commit bbde817

Browse files
docs: clean rustdoc — fix 5 unresolved intra-doc links
`cargo doc --no-deps` was generating 5 warnings: - `[`File`]` in src/area.rs:99 — File is std::fs::File but the bare name doesn't resolve from this scope. Fully qualified. - `[`&std::fs::File`]` and `[`&tempfile::NamedTempFile`]` in bytes.rs:233 + bytes.rs:255 — intra-doc links can't target reference types. Stripped the `&` prefix; both targets resolve via the dependency tree (memmap2 + tempfile both in Cargo.toml). `cargo doc --no-deps` now warning-free. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent bb390a7 commit bbde817

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/area.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl ByteArea {
9696
Ok(Bytes::from_source(mmap))
9797
}
9898

99-
/// Persist the temporary area file to `path` and return the underlying [`File`].
99+
/// Persist the temporary area file to `path` and return the underlying [`std::fs::File`].
100100
pub fn persist<P: AsRef<std::path::Path>>(self, path: P) -> io::Result<std::fs::File> {
101101
self.file.persist(path).map_err(Into::into)
102102
}

src/bytes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl Bytes {
230230
/// to remain open after mapping.
231231
///
232232
/// The argument may be any type that implements [`memmap2::MmapAsRawDesc`],
233-
/// such as [`&std::fs::File`] or [`&tempfile::NamedTempFile`].
233+
/// such as [`std::fs::File`] or [`tempfile::NamedTempFile`].
234234
#[cfg(feature = "mmap")]
235235
pub unsafe fn map_file<F>(file: F) -> std::io::Result<Self>
236236
where
@@ -252,7 +252,7 @@ impl Bytes {
252252
/// platform's alignment requirements (typically page size).
253253
///
254254
/// The argument may be any type that implements [`memmap2::MmapAsRawDesc`],
255-
/// such as [`&std::fs::File`] or [`&tempfile::NamedTempFile`].
255+
/// such as [`std::fs::File`] or [`tempfile::NamedTempFile`].
256256
#[cfg(feature = "mmap")]
257257
pub unsafe fn map_file_region<F>(file: F, offset: u64, len: usize) -> std::io::Result<Self>
258258
where

0 commit comments

Comments
 (0)