Skip to content

Commit 420553a

Browse files
committed
Merge branch 'fix-docs'
2 parents 150463c + 89a8cfe commit 420553a

File tree

96 files changed

+150
-150
lines changed

Some content is hidden

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

96 files changed

+150
-150
lines changed

gitoxide-core/src/hours/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ pub struct Context<W> {
3131
/// Estimate the hours it takes to produce the content of the repository in `_working_dir_`, with `_refname_` for
3232
/// the start of the commit graph traversal.
3333
///
34-
/// * _working_dir_ - The directory containing a '.git/' folder.
35-
/// * _refname_ - The name of the ref like 'main' or 'master' at which to start iterating the commit graph.
36-
/// * _progress_ - A way to provide progress and performance information
34+
/// * `_working_dir_` - The directory containing a '.git/' folder.
35+
/// * `_refname_` - The name of the ref like 'main' or 'master' at which to start iterating the commit graph.
36+
/// * `_progress_` - A way to provide progress and performance information
3737
pub fn estimate<W, P>(
3838
working_dir: &Path,
3939
rev_spec: &BStr,

gix-chunk/src/file/decode.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{convert::TryInto, ops::Range};
22

33
mod error {
4-
/// The value returned by [crate::FileRef::from_bytes()
4+
/// The value returned by [`crate::file::Index::from_bytes()`]
55
#[derive(Debug, thiserror::Error)]
66
#[allow(missing_docs)]
77
pub enum Error {

gix-chunk/src/file/index.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::file::Index;
66
pub mod offset_by_kind {
77
use std::fmt::{Display, Formatter};
88

9-
/// The error returned by [Index::offset_by_kind()][super::Index::offset_by_id()].
9+
/// The error returned by [`Index::offset_by_id()`][super::Index::offset_by_id()].
1010
#[allow(missing_docs)]
1111
#[derive(Debug)]
1212
pub struct Error {
@@ -28,7 +28,7 @@ pub mod offset_by_kind {
2828

2929
///
3030
pub mod data_by_kind {
31-
/// The error returned by [Index::data_by_kind()][super::Index::data_by_id()].
31+
/// The error returned by [`Index::data_by_id()`][super::Index::data_by_id()].
3232
#[derive(Debug, thiserror::Error)]
3333
#[allow(missing_docs)]
3434
pub enum Error {

gix-commitgraph/src/file/access.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ impl File {
1818

1919
/// Returns the commit data for the commit located at the given lexigraphical position.
2020
///
21-
/// `pos` must range from 0 to self.num_commits().
21+
/// `pos` must range from 0 to `self.num_commits()`.
2222
///
2323
/// # Panics
2424
///
@@ -35,7 +35,7 @@ impl File {
3535
}
3636

3737
/// Returns an object id at the given index in our list of (sorted) hashes.
38-
/// The position ranges from 0 to self.num_commits()
38+
/// The position ranges from 0 to `self.num_commits()`
3939
// copied from gix-odb/src/pack/index/ext
4040
pub fn id_at(&self, pos: file::Position) -> &gix_hash::oid {
4141
assert!(

gix-config-value/src/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub struct Color {
2424
/// wish to obtain the true value of the integer, you must account for the
2525
/// suffix after fetching the value. [`integer::Suffix`] provides
2626
/// [`bitwise_offset()`][integer::Suffix::bitwise_offset] to help with the
27-
/// math, or [to_decimal()][Integer::to_decimal()] for obtaining a usable value in one step.
27+
/// math, or [`to_decimal()`][Integer::to_decimal()] for obtaining a usable value in one step.
2828
#[derive(Default, Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
2929
pub struct Integer {
3030
/// The value, without any suffix modification

gix-config/src/file/init/from_paths.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ impl File<'static> {
6363
Self::from_paths_metadata_buf(path_meta, &mut buf, err_on_nonexisting_paths, options)
6464
}
6565

66-
/// Like [from_paths_metadata()][Self::from_paths_metadata()], but will use `buf` to temporarily store the config file
66+
/// Like [`from_paths_metadata()`][Self::from_paths_metadata()], but will use `buf` to temporarily store the config file
6767
/// contents for parsing instead of allocating an own buffer.
6868
///
6969
/// If `err_on_nonexisting_paths` is false, instead of aborting with error, we will continue to the next path instead.

gix-config/src/file/section/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<'a> Section<'a> {
5252
}
5353

5454
/// Return the unique `id` of the section, for use with the `*_by_id()` family of methods
55-
/// in [gix_config::File][crate::File].
55+
/// in [`gix_config::File`][crate::File].
5656
pub fn id(&self) -> SectionId {
5757
self.id
5858
}

gix-diff/src/tree/changes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{
88
tree::{visit::Change, TreeInfoPair},
99
};
1010

11-
/// The error returned by [tree::Changes::needed_to_obtain()].
11+
/// The error returned by [`tree::Changes::needed_to_obtain()`].
1212
#[derive(Debug, thiserror::Error)]
1313
#[allow(missing_docs)]
1414
pub enum Error {
@@ -42,7 +42,7 @@ impl<'a> tree::Changes<'a> {
4242
/// by the delegate implementation which should be as specific as possible. Rename tracking can be computed on top of the changes
4343
/// received by the `delegate`.
4444
/// * cycle checking is not performed, but can be performed in the delegate which can return [`tree::visit::Action::Cancel`] to stop the traversal.
45-
/// * [std::mem::ManuallyDrop] is used because `Peekable` is needed. When using it as wrapper around our no-drop iterators, all of the sudden
45+
/// * [`std::mem::ManuallyDrop`] is used because `Peekable` is needed. When using it as wrapper around our no-drop iterators, all of the sudden
4646
/// borrowcheck complains as Drop is present (even though it's not)
4747
///
4848
/// [git_cmp_c]: https://github.com/git/git/blob/311531c9de557d25ac087c1637818bd2aad6eb3a/tree-diff.c#L49:L65

gix-diff/src/tree/recorder.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum Location {
1818
}
1919

2020
/// A Change as observed by a call to [`visit(…)`][visit::Visit::visit()], enhanced with the path affected by the change.
21-
/// Its similar to [visit::Change] but includes the path that changed.
21+
/// Its similar to [`visit::Change`] but includes the path that changed.
2222
#[derive(Clone, Debug, PartialEq, Eq)]
2323
#[allow(missing_docs)]
2424
pub enum Change {

gix-discover/src/upwards/types.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::{env, ffi::OsStr, path::PathBuf};
22

3-
/// The error returned by [gix_discover::upwards()][crate::upwards()].
3+
/// The error returned by [`gix_discover::upwards()`][crate::upwards()].
44
#[derive(Debug, thiserror::Error)]
55
#[allow(missing_docs)]
66
pub enum Error {

gix-features/src/parallel/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
//! Run computations in parallel, or not based the `parallel` feature toggle.
22
//!
3-
//! ### in_parallel(…)
3+
//! ### `in_parallel`(…)
44
//!
55
//! The [`in_parallel(…)`][in_parallel()] is the typical fan-out-fan-in mode of parallelism, with thread local storage
66
//! made available to a `consume(…)` function to process input. The result is sent to the [`Reduce`] running in the calling
77
//! thread to aggregate the results into a single output, which is returned by [`in_parallel()`].
88
//!
9-
//! Interruptions can be achieved by letting the reducers [`feed(…)`][Reduce::feed()]` method fail.
9+
//! Interruptions can be achieved by letting the reducers [`feed(…)`][Reduce::feed()] method fail.
1010
//!
1111
//! It gets a boost in usability as it allows threads to borrow variables from the stack, most commonly the repository itself
1212
//! or the data to work on.

gix-features/src/threading.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod _impl {
1717
pub type Mutable<T> = parking_lot::Mutex<T>;
1818
/// A guarded reference suitable for safekeeping in a struct.
1919
pub type RefGuard<'a, T> = parking_lot::RwLockReadGuard<'a, T>;
20-
/// A mapped reference created from a RefGuard
20+
/// A mapped reference created from a `RefGuard`
2121
pub type MappedRefGuard<'a, U> = parking_lot::MappedRwLockReadGuard<'a, U>;
2222

2323
/// Get a shared reference through a [`MutableOnDemand`] for read-only access.

gix-fs/src/stack.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ impl Stack {
5656
/// Set the current stack to point to the `relative` path and call `push_comp()` each time a new path component is popped
5757
/// along with the stacks state for inspection to perform an operation that produces some data.
5858
///
59-
/// The full path to `relative` will be returned along with the data returned by push_comp.
59+
/// The full path to `relative` will be returned along with the data returned by `push_comp`.
6060
/// Note that this only works correctly for the delegate's `push_directory()` and `pop_directory()` methods if
6161
/// `relative` paths are terminal, so point to their designated file or directory.
6262
pub fn make_relative_path_current(

gix-glob/src/pattern.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bitflags! {
3030

3131
/// Describes whether to match a path case sensitively or not.
3232
///
33-
/// Used in [Pattern::matches_repo_relative_path()].
33+
/// Used in [`Pattern::matches_repo_relative_path()`].
3434
#[derive(Default, Debug, PartialOrd, PartialEq, Copy, Clone, Hash, Ord, Eq)]
3535
pub enum Case {
3636
/// The case affects the match

gix-hash/src/oid.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ impl PartialEq<crate::ObjectId> for &oid {
206206

207207
/// Manually created from a version that uses a slice, and we forcefully try to convert it into a borrowed array of the desired size
208208
/// Could be improved by fitting this into serde.
209-
/// Unfortunately the serde::Deserialize derive wouldn't work for borrowed arrays.
209+
/// Unfortunately the `serde::Deserialize` derive wouldn't work for borrowed arrays.
210210
#[cfg(feature = "serde")]
211211
impl<'de: 'a, 'a> serde::Deserialize<'de> for &'a oid {
212212
fn deserialize<D>(deserializer: D) -> Result<Self, <D as serde::Deserializer<'de>>::Error>

gix-hash/src/prefix.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use std::{cmp::Ordering, convert::TryFrom};
22

33
use crate::{oid, ObjectId, Prefix};
44

5-
/// The error returned by [Prefix::new()].
5+
/// The error returned by [`Prefix::new()`].
66
#[derive(Debug, thiserror::Error)]
77
#[allow(missing_docs)]
88
pub enum Error {
@@ -17,7 +17,7 @@ pub enum Error {
1717

1818
///
1919
pub mod from_hex {
20-
/// The error returned by [Prefix::from_hex][super::Prefix::from_hex()].
20+
/// The error returned by [`Prefix::from_hex`][super::Prefix::from_hex()].
2121
#[derive(Debug, Eq, PartialEq, thiserror::Error)]
2222
#[allow(missing_docs)]
2323
pub enum Error {

gix-hashtable/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Customized HashMap and Hasher implementation optimized for using `ObjectId`s as keys.
1+
//! Customized `HashMap` and Hasher implementation optimized for using `ObjectId`s as keys.
22
//!
33
//! The crate mirrors `std::collections` in layout for familiarity.
44
#![deny(missing_docs, rust_2018_idioms)]
@@ -35,7 +35,7 @@ pub mod sync {
3535

3636
///
3737
pub mod hash {
38-
/// A Hasher for usage with HashMap keys that are already robust hashes (like an `ObjectId`).
38+
/// A Hasher for usage with `HashMap` keys that are already robust hashes (like an `ObjectId`).
3939
/// The first `8` bytes of the hash are used as the `HashMap` hash
4040
#[derive(Default, Clone, Copy)]
4141
pub struct Hasher(u64);
@@ -75,7 +75,7 @@ pub mod hash {
7575
panic_other_writers!(write_isize, isize);
7676
}
7777

78-
/// A Hasher for usage with HashMap keys that are already robust hashes (like an `ObjectId`).
78+
/// A Hasher for usage with `HashMap` keys that are already robust hashes (like an `ObjectId`).
7979
/// The first `8` bytes of the hash are used as the `HashMap` hash
8080
#[derive(Default, Clone, Copy)]
8181
pub struct Builder;
@@ -88,9 +88,9 @@ pub mod hash {
8888
}
8989
}
9090

91-
/// A HashMap for usage with keys that are already robust hashes (like an `ObjectId`).
91+
/// A `HashMap` for usage with keys that are already robust hashes (like an `ObjectId`).
9292
/// The first `8` bytes of the hash are used as the `HashMap` hash
9393
pub type HashMap<K, V> = hashbrown::HashMap<K, V, hash::Builder>;
94-
/// A HashSet for usage with keys that are already robust hashes (like an `ObjectId`).
94+
/// A `HashSet` for usage with keys that are already robust hashes (like an `ObjectId`).
9595
/// The first `8` bytes of the hash are used as the `HashMap` hash
9696
pub type HashSet<T = ObjectId> = hashbrown::HashSet<T, hash::Builder>;

gix-index/src/access/mod.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ impl State {
103103

104104
/// Return the entry at `idx` or _panic_ if the index is out of bounds.
105105
///
106-
/// The `idx` is typically returned by [entry_by_path_and_stage()][State::entry_by_path_and_stage()].
106+
/// The `idx` is typically returned by [`entry_by_path_and_stage()`][State::entry_by_path_and_stage()].
107107
pub fn entry(&self, idx: usize) -> &Entry {
108108
&self.entries[idx]
109109
}
110110

111111
/// Returns a boolean value indicating whether the index is sparse or not.
112112
///
113-
/// An index is sparse if it contains at least one [Mode::DIR][entry::Mode::DIR] entry.
113+
/// An index is sparse if it contains at least one [`Mode::DIR`][entry::Mode::DIR] entry.
114114
pub fn is_sparse(&self) -> bool {
115115
self.is_sparse
116116
}
@@ -180,7 +180,7 @@ impl State {
180180
/// [`entry_index_by_path_and_stage_bounded()`][State::entry_index_by_path_and_stage_bounded()] is used with
181181
/// the `upper_bound` being the amount of entries before the first call to this method.
182182
///
183-
/// Alternatively, make sure to call [sort_entries()][State::sort_entries()] before entry lookup by path to restore
183+
/// Alternatively, make sure to call [`sort_entries()`][State::sort_entries()] before entry lookup by path to restore
184184
/// the invariant.
185185
pub fn dangerously_push_entry(
186186
&mut self,

gix-index/src/decode/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ mod error {
1010

1111
use crate::{decode, extension};
1212

13-
/// The error returned by [State::from_bytes()][crate::State::from_bytes()].
13+
/// The error returned by [`State::from_bytes()`][crate::State::from_bytes()].
1414
#[derive(Debug, thiserror::Error)]
1515
#[allow(missing_docs)]
1616
pub enum Error {

gix-index/src/entry/stat.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl Stat {
7575
}
7676
}
7777

78-
/// Creates stat information from the result of symlink_metadata.
78+
/// Creates stat information from the result of `symlink_metadata`.
7979
pub fn from_fs(fstat: &std::fs::Metadata) -> Result<Stat, SystemTimeError> {
8080
let mtime = fstat.modified().unwrap_or(std::time::UNIX_EPOCH);
8181
let ctime = fstat.created().unwrap_or(std::time::UNIX_EPOCH);

gix-index/src/extension/tree/verify.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use bstr::{BString, ByteSlice};
44

55
use crate::extension::Tree;
66

7-
/// The error returned by [Tree::verify()][crate::extension::Tree::verify()].
7+
/// The error returned by [`Tree::verify()`][crate::extension::Tree::verify()].
88
#[derive(Debug, thiserror::Error)]
99
#[allow(missing_docs)]
1010
pub enum Error {

gix-index/src/verify.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::State;
66
pub mod entries {
77
use bstr::BString;
88

9-
/// The error returned by [State::verify_entries()][crate::State::verify_entries()].
9+
/// The error returned by [`State::verify_entries()`][crate::State::verify_entries()].
1010
#[derive(Debug, thiserror::Error)]
1111
#[allow(missing_docs)]
1212
pub enum Error {
@@ -30,7 +30,7 @@ pub mod extensions {
3030
None
3131
}
3232

33-
/// The error returned by [State::verify_extensions()][crate::State::verify_extensions()].
33+
/// The error returned by [`State::verify_extensions()`][crate::State::verify_extensions()].
3434
#[derive(Debug, thiserror::Error)]
3535
#[allow(missing_docs)]
3636
pub enum Error {

gix-lock/src/file.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl File {
1717
self.inner.with_mut(|tf| f(tf.as_file_mut())).and_then(|res| res)
1818
}
1919
/// Close the lock file to prevent further writes and to save system resources.
20-
/// A call to [Marker::commit()] is allowed on the [`Marker`] to write changes back to the resource.
20+
/// A call to [`Marker::commit()`] is allowed on the [`Marker`] to write changes back to the resource.
2121
pub fn close(self) -> std::io::Result<Marker> {
2222
Ok(Marker {
2323
inner: self.inner.close()?,

gix-mailmap/src/snapshot/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ impl Snapshot {
2222

2323
/// Create a new instance from `entries`.
2424
///
25-
/// These can be obtained using [crate::parse()].
25+
/// These can be obtained using [`crate::parse()`].
2626
pub fn new<'a>(entries: impl IntoIterator<Item = crate::Entry<'a>>) -> Self {
2727
let mut snapshot = Self::default();
2828
snapshot.merge(entries);
@@ -54,7 +54,7 @@ impl Snapshot {
5454
/// Transform our acceleration structure into a list of entries.
5555
///
5656
/// Note that the order is different from how they were obtained initially, and are explicitly ordered by
57-
/// (old_email, old_name).
57+
/// (`old_email`, `old_name`).
5858
pub fn entries(&self) -> Vec<crate::Entry<'_>> {
5959
let mut out = Vec::with_capacity(self.entries_by_old_email.len());
6060
for entry in &self.entries_by_old_email {

gix-object/src/commit/ref_iter.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl<'a> CommitRefIter<'a> {
5151
Token::try_into_id(tree_id).ok_or_else(missing_field)
5252
}
5353

54-
/// Return all parent_ids as iterator.
54+
/// Return all `parent_ids` as iterator.
5555
///
5656
/// Parsing errors are ignored quietly.
5757
pub fn parent_ids(self) -> impl Iterator<Item = gix_hash::ObjectId> + 'a {

gix-object/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub(crate) mod parse;
3737
///
3838
pub mod kind;
3939

40-
/// The four types of objects that git differentiates. #[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
40+
/// The four types of objects that git differentiates.
4141
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4242
#[derive(PartialEq, Eq, Debug, Hash, Ord, PartialOrd, Clone, Copy)]
4343
#[allow(missing_docs)]

gix-object/src/tree/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub mod write;
1111

1212
/// The mode of items storable in a tree, similar to the file mode on a unix file system.
1313
///
14-
/// Used in [mutable::Entry][crate::tree::Entry] and [EntryRef].
14+
/// Used in [`mutable::Entry`][crate::tree::Entry] and [`EntryRef`].
1515
#[derive(Clone, Copy, PartialEq, Eq, Debug, Ord, PartialOrd, Hash)]
1616
#[repr(u16)]
1717
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]

gix-object/tests/encode/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// Because the TryFrom implementations don't return proper errors
1+
/// Because the `TryFrom` implementations don't return proper errors
22
/// on failure
33
#[derive(Debug, thiserror::Error)]
44
enum Error {

gix-odb/src/store_impls/dynamic/load_index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl super::Store {
101101
}
102102
}
103103

104-
/// load a new index (if not yet loaded), and return true if one was indeed loaded (leading to a state_id() change) of the current index.
104+
/// load a new index (if not yet loaded), and return true if one was indeed loaded (leading to a `state_id()` change) of the current index.
105105
/// Note that interacting with the slot-map is inherently racy and we have to deal with it, being conservative in what we even try to load
106106
/// as our index might already be out-of-date as we try to use it to learn what's next.
107107
fn load_next_index(&self, mut index: arc_swap::Guard<Arc<SlotMapIndex>>) -> bool {

gix-pack/src/bundle/find.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ impl crate::Bundle {
1919
}
2020

2121
/// Special-use function to get an object given an index previously returned from
22-
/// internal_find_pack_index.
22+
/// `internal_find_pack_index`.
2323
///
2424
/// # Panics
2525
///

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ impl crate::Bundle {
168168
/// # Note
169169
///
170170
/// As it sends portions of the input to a thread it requires the 'static lifetime for the interrupt flags. This can only
171-
/// be satisfied by a static AtomicBool which is only suitable for programs that only run one of these operations at a time
171+
/// be satisfied by a static `AtomicBool` which is only suitable for programs that only run one of these operations at a time
172172
/// or don't mind that all of them abort when the flag is set.
173173
pub fn write_to_directory_eagerly<P>(
174174
pack: impl io::Read + Send + 'static,

0 commit comments

Comments
 (0)