Skip to content

Commit bfb1c34

Browse files
committed
Small documentation fixes
Small grammar and spelling changes to make the codebase better.
1 parent 52906fb commit bfb1c34

File tree

25 files changed

+50
-50
lines changed

25 files changed

+50
-50
lines changed

gitoxide-core/src/hours/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct Context<W> {
1717
pub file_stats: bool,
1818
/// Collect how many lines in files have been added, removed and modified (without rename tracking).
1919
pub line_stats: bool,
20-
/// The amount of threads to use. If unset, use all cores, if 0 use al physical cores.
20+
/// The number of threads to use. If unset, use all cores, if 0 use all physical cores.
2121
pub threads: Option<usize>,
2222
/// Omit unifying identities by name and email which can lead to the same author appear multiple times
2323
/// due to using different names or email addresses.

gix-archive/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub struct Options {
8080
pub format: Format,
8181
/// Given a `path`, originating in the git tree, to place into the archive, put `<prefix>/path` in front of it.
8282
///
83-
/// Note that that `/` should be used as separator, and that a prefix directory has to end with `/`.
83+
/// Note that `/` should be used as separator, and that a prefix directory has to end with `/`.
8484
pub tree_prefix: Option<BString>,
8585
/// The modification time for all entries in the archive as seen since UNIX epoch.
8686
///

gix-command/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ mod prepare {
159159
/// Set the name or path to the shell `program` to use if a shell is to be used, to avoid
160160
/// using the default shell which is `sh`.
161161
///
162-
/// Note that that shells that are not Bourne-style cannot be expected to work correctly,
162+
/// Note that shells that are not Bourne-style cannot be expected to work correctly,
163163
/// because POSIX shell syntax is assumed when searching for and conditionally adding
164164
/// `"$@"` to receive arguments, where applicable (and in the behaviour of
165165
/// [`with_quoted_command()`](Self::with_quoted_command()), if called).

gix-features/src/parallel/in_parallel.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ pub fn build_thread() -> std::thread::Builder {
3838
}
3939

4040
/// Read items from `input` and `consume` them in multiple threads,
41-
/// whose output output is collected by a `reducer`. Its task is to
42-
/// aggregate these outputs into the final result returned by this function with the benefit of not having to be thread-safe.
41+
/// whose output is collected by a `reducer`. Its task is to
42+
/// aggregate these outputs into the final result returned by this function, with the benefit of not having to be thread-safe.
4343
///
44-
/// * if `thread_limit` is `Some`, the given amount of threads will be used. If `None`, all logical cores will be used.
45-
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be based to `consume`
44+
/// * if `thread_limit` is `Some`, then the given number of threads will be used. If `None`, all logical cores will be used.
45+
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be passed to `consume`
4646
/// * `consume(Item, &mut State) -> Output` produces an output given an input obtained by `input` along with mutable state initially
4747
/// created by `new_thread_state(…)`.
4848
/// * For `reducer`, see the [`Reduce`] trait
@@ -103,12 +103,12 @@ where
103103
}
104104

105105
/// Read items from `input` and `consume` them in multiple threads,
106-
/// whose output output is collected by a `reducer`. Its task is to
106+
/// whose output is collected by a `reducer`. Its task is to
107107
/// aggregate these outputs into the final result returned by this function with the benefit of not having to be thread-safe.
108-
/// Caall `finalize` to finish the computation, once per thread, if there was no error sending results earlier.
108+
/// Call `finalize` to finish the computation, once per thread, if there was no error sending results earlier.
109109
///
110-
/// * if `thread_limit` is `Some`, the given amount of threads will be used. If `None`, all logical cores will be used.
111-
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be based to `consume`
110+
/// * if `thread_limit` is `Some`, then the given number of threads will be used. If `None`, all logical cores will be used.
111+
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be passed to `consume`
112112
/// * `consume(Item, &mut State) -> Output` produces an output given an input obtained by `input` along with mutable state initially
113113
/// created by `new_thread_state(…)`.
114114
/// * `finalize(State) -> Output` is called to potentially process remaining work that was placed in `State`.

gix-features/src/parallel/reduce.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ pub trait Reduce {
232232
///
233233
/// If an `Error` is returned, the entire operation will be stopped.
234234
fn feed(&mut self, item: Self::Input) -> Result<Self::FeedProduce, Self::Error>;
235-
/// Called once once all items where passed to `feed()`, producing the final `Output` of the operation or an `Error`.
235+
/// Called once for all items that were passed to `feed()`, producing the final `Output` of the operation or an `Error`.
236236
fn finalize(self) -> Result<Self::Output, Self::Error>;
237237
}
238238

gix-features/src/parallel/serial.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ mod not_parallel {
116116
pub use not_parallel::{build_thread, in_parallel_with_slice, join, threads, Scope};
117117

118118
/// Read items from `input` and `consume` them in a single thread, producing an output to be collected by a `reducer`,
119-
/// whose task is to aggregate these outputs into the final result returned by this function.
119+
/// whose task it is to aggregate these outputs into the final result returned by this function.
120120
///
121-
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be based to `consume`
121+
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be passed to `consume`
122122
/// * `consume(Item, &mut State) -> Output` produces an output given an input along with mutable state.
123123
/// * For `reducer`, see the [`Reduce`] trait
124-
/// * if `thread_limit` has no effect as everything is run on the main thread, but is present to keep the signature
124+
/// * `thread_limit` has no effect as everything is run on the main thread, but is present to keep the signature
125125
/// similar to the parallel version.
126126
///
127127
/// **This serial version performing all calculations on the current thread.**
@@ -143,12 +143,12 @@ where
143143
}
144144

145145
/// Read items from `input` and `consume` them in multiple threads,
146-
/// whose output output is collected by a `reducer`. Its task is to
146+
/// whose output is collected by a `reducer`. Its task is to
147147
/// aggregate these outputs into the final result returned by this function with the benefit of not having to be thread-safe.
148-
/// Caall `finalize` to finish the computation, once per thread, if there was no error sending results earlier.
148+
/// Call `finalize` to finish the computation, once per thread, if there was no error sending results earlier.
149149
///
150-
/// * if `thread_limit` is `Some`, the given amount of threads will be used. If `None`, all logical cores will be used.
151-
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be based to `consume`
150+
/// * if `thread_limit` is `Some`, the given number of threads will be used. If `None`, all logical cores will be used.
151+
/// * `new_thread_state(thread_number) -> State` produces thread-local state once per thread to be passed to `consume`
152152
/// * `consume(Item, &mut State) -> Output` produces an output given an input obtained by `input` along with mutable state initially
153153
/// created by `new_thread_state(…)`.
154154
/// * `finalize(State) -> Output` is called to potentially process remaining work that was placed in `State`.

gix-filter/src/driver/apply.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ impl State {
7272
/// Each call to this method will cause the corresponding filter to be invoked unless `driver` indicates a `process` filter,
7373
/// which is only launched once and maintained using this state.
7474
///
75-
/// Note that it's not an error if there is no filter process for `operation` or if a long-running process doesn't supported
75+
/// Note that it's not an error if there is no filter process for `operation` or if a long-running process doesn't support
7676
/// the desired capability.
7777
///
7878
/// ### Deviation
7979
///
80-
/// If a long running process returns the 'abort' status after receiving the data, it will be removed similar to how `git` does it.
81-
/// However, it delivers an unsuccessful error status later, it will not be removed, but reports the error only.
82-
/// If any other non-'error' status is received, the process will be stopped. But that doesn't happen if if such a status is received
80+
/// If a long running process returns the 'abort' status after receiving the data, it will be removed similarly to how `git` does it.
81+
/// However, if it returns an unsuccessful error status later, it will not be removed, but reports the error only.
82+
/// If any other non-'error' status is received, the process will be stopped. But that doesn't happen if such a status is received
8383
/// after reading the filtered result.
8484
pub fn apply<'a>(
8585
&'a mut self,

gix-fs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ pub mod io_err {
9696
}
9797

9898
#[cfg(not(unix))]
99-
/// Returns whether a a file has the executable permission set.
99+
/// Returns whether a file has the executable permission set.
100100
pub fn is_executable(_metadata: &std::fs::Metadata) -> bool {
101101
false
102102
}

gix-hash/src/oid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ impl hash::Hash for oid {
3434
}
3535
}
3636

37-
/// A utility able to format itself with the given amount of characters in hex.
37+
/// A utility able to format itself with the given number of characters in hex.
3838
#[derive(PartialEq, Eq, Hash, Ord, PartialOrd)]
3939
pub struct HexDisplay<'a> {
4040
inner: &'a oid,

gix-object/src/commit/message/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ impl<'a> MessageRef<'a> {
7575
summary(self.title)
7676
}
7777

78-
/// Further parse the body into into non-trailer and trailers, which can be iterated from the returned [`BodyRef`].
78+
/// Further parse the body into non-trailer and trailers, which can be iterated from the returned [`BodyRef`].
7979
pub fn body(&self) -> Option<BodyRef<'a>> {
8080
self.body.map(|b| BodyRef::from_bytes(b))
8181
}

0 commit comments

Comments
 (0)