Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 712091a

Browse files
committed
fix: resolve broken intra-doc links in tail, csplit, and split utilities
Fixed broken intra-doc links that reference struct fields and enum variants across three utilities. These caused rustdoc warnings that are treated as errors in CI with -Dwarnings flag. Changes: - tail/chunks.rs:211: [Some(bytes)] → `Some(bytes)` - csplit/csplit.rs:283: [self.dev_null] → `self.dev_null` - csplit/csplit.rs:575: [self.size] → `self.size` - split/number.rs:115: [Err(Overflow)] → `Err(Overflow)` - split/number.rs:125: [Err(Overflow)] → `Err(Overflow)` - split/number.rs:215: [Err(Overflow)] → `Err(Overflow)`
1 parent 670b14b commit 712091a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/uu/csplit/src/csplit.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ impl SplitWriter<'_> {
280280
}
281281

282282
/// Writes the line to the current split.
283-
/// If [`self.dev_null`] is true, then the line is discarded.
283+
/// If `self.dev_null` is true, then the line is discarded.
284284
///
285285
/// # Errors
286286
///
@@ -572,7 +572,7 @@ where
572572
self.size = size;
573573
}
574574

575-
/// Add a line to the buffer. If the buffer has [`self.size`] elements, then its head is removed and
575+
/// Add a line to the buffer. If the buffer has `self.size` elements, then its head is removed and
576576
/// the new line is pushed to the buffer. The removed head is then available in the returned
577577
/// option.
578578
fn add_line_to_buffer(&mut self, ln: usize, line: String) -> Option<String> {

src/uu/split/src/number.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ impl Number {
112112
///
113113
/// If incrementing this number would result in an overflow beyond
114114
/// the maximum representable number, then return
115-
/// [`Err(Overflow)`]. The [`FixedWidthNumber`] overflows, but
115+
/// `Err(Overflow)`. The [`FixedWidthNumber`] overflows, but
116116
/// [`DynamicWidthNumber`] does not.
117117
///
118118
/// The [`DynamicWidthNumber`] follows a non-standard incrementing
@@ -122,7 +122,7 @@ impl Number {
122122
///
123123
/// # Errors
124124
///
125-
/// This method returns [`Err(Overflow)`] when attempting to
125+
/// This method returns `Err(Overflow)` when attempting to
126126
/// increment beyond the largest representable number.
127127
///
128128
/// # Examples
@@ -212,7 +212,7 @@ impl FixedWidthNumber {
212212
///
213213
/// This method adds one to this number. If incrementing this
214214
/// number would require more digits than are available with the
215-
/// specified width, then this method returns [`Err(Overflow)`].
215+
/// specified width, then this method returns `Err(Overflow)`.
216216
fn increment(&mut self) -> Result<(), Overflow> {
217217
for i in (0..self.digits.len()).rev() {
218218
// Increment the current digit.

src/uu/tail/src/chunks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ impl BytesChunk {
208208

209209
/// Fills `self.buffer` with maximal [`BUFFER_SIZE`] number of bytes, draining the reader by
210210
/// that number of bytes. If EOF is reached (so 0 bytes are read), then returns
211-
/// [`UResult<None>`] or else the result with [`Some(bytes)`] where bytes is the number of bytes
211+
/// [`UResult<None>`] or else the result with `Some(bytes)` where bytes is the number of bytes
212212
/// read from the source.
213213
pub fn fill(&mut self, filehandle: &mut impl BufRead) -> UResult<Option<usize>> {
214214
let num_bytes = filehandle.read(&mut self.buffer)?;

0 commit comments

Comments
 (0)