Skip to content

Commit efd20d4

Browse files
committed
[git-pack] fix docs
1 parent 38c7961 commit efd20d4

File tree

14 files changed

+33
-39
lines changed

14 files changed

+33
-39
lines changed

git-features/src/zlib/stream/deflate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use flate2::Compress;
22

33
const BUF_SIZE: usize = 4096 * 8;
44

5-
/// A utility to zlib compress anything that is written via its [io::Write] implementation.
5+
/// A utility to zlib compress anything that is written via its [Write][std::io::Write] implementation.
66
///
77
/// Be sure to call `flush()` when done to finalize the deflate stream.
88
pub struct Write<W> {

git-pack/src/bundle/find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::data;
33
impl crate::Bundle {
44
/// Find an object with the given [`ObjectId`][git_hash::ObjectId] and place its data into `out`.
55
///
6-
/// [`cache`][pack::cache::DecodeEntry] is used to accelerate the lookup.
6+
/// [`cache`][crate::cache::DecodeEntry] is used to accelerate the lookup.
77
///
88
/// **Note** that ref deltas are automatically resolved within this pack only, which makes this implementation unusable
99
/// for thin packs, which by now are expected to be resolved already.

git-pack/src/bundle/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ mod verify {
1111
use git_features::progress::Progress;
1212

1313
impl super::Bundle {
14-
/// Similar to [`pack::index::File::verify_integrity()`] but more convenient to call as the presence of the
14+
/// Similar to [`crate::index::File::verify_integrity()`] but more convenient to call as the presence of the
1515
/// pack file is a given.
1616
pub fn verify_integrity<C, P>(
1717
&self,

git-pack/src/bundle/write/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ impl crate::Bundle {
6666
})
6767
}
6868

69-
/// Equivalent to [`write_to_directory()`][pack::Bundle::write_to_directory()] but offloads reading of the pack into its own thread, hence the `Send + 'static'` bounds.
69+
/// Equivalent to [`write_to_directory()`][crate::Bundle::write_to_directory()] but offloads reading of the pack into its own thread, hence the `Send + 'static'` bounds.
7070
pub fn write_to_directory_eagerly(
7171
pack: impl io::Read + Send + 'static,
7272
pack_size: Option<u64>,

git-pack/src/bundle/write/types.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
use std::{io, path::PathBuf, sync::Arc};
22
use tempfile::NamedTempFile;
33

4-
/// Configuration for [write_to_directory][pack::Bundle::write_to_directory()] or
5-
/// [write_to_directory_eagerly][pack::Bundle::write_to_directory_eagerly()]
4+
/// Configuration for [write_to_directory][crate::Bundle::write_to_directory()] or
5+
/// [write_to_directory_eagerly][crate::Bundle::write_to_directory_eagerly()]
66
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
77
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
88
pub struct Options {
99
/// The amount of threads to use at most when resolving the pack. If `None`, all logical cores are used.
1010
pub thread_limit: Option<usize>,
1111
/// Determine how much processing to spend on protecting against corruption or recovering from errors.
1212
pub iteration_mode: crate::data::input::Mode,
13-
/// The version of pack index to write, should be [`pack::index::Version::default()`]
13+
/// The version of pack index to write, should be [`crate::index::Version::default()`]
1414
pub index_kind: crate::index::Version,
1515
}
1616

@@ -25,8 +25,8 @@ impl Default for Options {
2525
}
2626
}
2727

28-
/// Returned by [write_to_directory][pack::Bundle::write_to_directory()] or
29-
/// [write_to_directory_eagerly][pack::Bundle::write_to_directory_eagerly()]
28+
/// Returned by [write_to_directory][crate::Bundle::write_to_directory()] or
29+
/// [write_to_directory_eagerly][crate::Bundle::write_to_directory_eagerly()]
3030
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone)]
3131
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
3232
pub struct Outcome {

git-pack/src/data/file/decode_entry.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl File {
9797
);
9898
}
9999

100-
/// Obtain the [`Entry`][pack::data::Entry] at the given `offset` into the pack.
100+
/// Obtain the [`Entry`][crate::data::Entry] at the given `offset` into the pack.
101101
///
102102
/// The `offset` is typically obtained from the pack index file.
103103
pub fn entry(&self, offset: u64) -> crate::data::Entry {

git-pack/src/data/input/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{fs, io};
88

99
/// An iterator over [`Entries`][input::Entry] in a byte stream.
1010
///
11-
/// The iterator used as part of [Bundle::write_to_directory(…)][pack::Bundle::write_to_directory()].
11+
/// The iterator used as part of [Bundle::write_to_directory(…)][crate::Bundle::write_to_directory()].
1212
pub struct BytesToEntriesIter<R> {
1313
read: R,
1414
decompressor: Option<Box<Decompress>>,
@@ -268,7 +268,7 @@ where
268268
}
269269

270270
impl crate::data::File {
271-
/// Returns an iterator over [`Entries`][pack::data::input::Entry], without making use of the memory mapping.
271+
/// Returns an iterator over [`Entries`][crate::data::input::Entry], without making use of the memory mapping.
272272
pub fn streaming_iter(&self) -> Result<BytesToEntriesIter<impl io::BufRead>, input::Error> {
273273
let reader = io::BufReader::with_capacity(4096 * 8, fs::File::open(&self.path)?);
274274
BytesToEntriesIter::new_from_header(reader, input::Mode::Verify, input::EntryDataMode::KeepAndCrc32)

git-pack/src/data/input/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::io;
22

3-
/// Returned by [`BytesToEntriesIter::new_from_header()`][pack::data::BytesToEntriesIter::new_from_header()] and as part
4-
/// of `Item` of [`BytesToEntriesIter`][pack::data::BytesToEntriesIter].
3+
/// Returned by [`BytesToEntriesIter::new_from_header()`][crate::data::BytesToEntriesIter::new_from_header()] and as part
4+
/// of `Item` of [`BytesToEntriesIter`][crate::data::BytesToEntriesIter].
55
#[derive(thiserror::Error, Debug)]
66
#[allow(missing_docs)]
77
pub enum Error {

git-pack/src/find.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub trait Find {
1313
type Error: std::error::Error + 'static;
1414

1515
/// Find an object matching `id` in the database while placing its raw, undecoded data into `buffer`.
16-
/// A `pack_cache` can be used to speed up subsequent lookups, set it to [`pack::cache::Never`] if the
16+
/// A `pack_cache` can be used to speed up subsequent lookups, set it to [`crate::cache::Never`] if the
1717
/// workload isn't suitable for caching.
1818
///
1919
/// Returns `Some` object if it was present in the database, or the error that occurred during lookup or object

git-pack/src/index/traverse/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::collections::BTreeMap;
22

3-
/// The outcome of the [`traverse()`][pack::index::File::traverse()] method
3+
/// The outcome of the [`traverse()`][crate::index::File::traverse()] method
44
#[derive(Debug, PartialEq, Eq, Hash, Ord, PartialOrd, Clone)]
55
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
66
pub struct Outcome {
@@ -111,7 +111,7 @@ impl Default for Algorithm {
111111
}
112112
}
113113

114-
/// Traversal options for [`traverse()`][pack::index::File::traverse()]
114+
/// Traversal options for [`traverse()`][crate::index::File::traverse()]
115115
#[derive(Debug, PartialEq, Eq, Hash, Ord, PartialOrd, Clone)]
116116
#[cfg_attr(feature = "serde1", derive(serde::Serialize, serde::Deserialize))]
117117
pub struct Options {

0 commit comments

Comments
 (0)