Skip to content

Commit cf50f28

Browse files
committed
[git-packetline] fix doc links
1 parent 1328c5b commit cf50f28

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

git-packetline/src/immutable.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,27 @@ impl<'a> PacketLine<'a> {
2727
}
2828
}
2929

30-
/// Return this instance as slice if it's [`Data`][Borrowed::Data].
30+
/// Return this instance as slice if it's [`Data`][PacketLine::Data].
3131
pub fn as_slice(&self) -> Option<&[u8]> {
3232
match self {
3333
PacketLine::Data(d) => Some(d),
3434
PacketLine::Flush | PacketLine::Delimiter | PacketLine::ResponseEnd => None,
3535
}
3636
}
37-
/// Return this instance's [`as_slice()`][Borrowed::as_slice()] as [`BStr`].
37+
/// Return this instance's [`as_slice()`][PacketLine::as_slice()] as [`BStr`].
3838
pub fn as_bstr(&self) -> Option<&BStr> {
3939
self.as_slice().map(Into::into)
4040
}
41-
/// Interpret this instance's [`as_slice()`][Borrowed::as_slice()] as [`Error`].
41+
/// Interpret this instance's [`as_slice()`][PacketLine::as_slice()] as [`Error`].
4242
///
4343
/// This works for any data received in an error [channel][crate::Channel].
4444
///
4545
/// Note that this creates an unchecked error using the slice verbatim, which is useful to [serialize it][Error::to_write()].
46-
/// See [`check_error()`][Borrowed::check_error()] for a version that assures the error information is in the expected format.
46+
/// See [`check_error()`][PacketLine::check_error()] for a version that assures the error information is in the expected format.
4747
pub fn to_error(&self) -> Option<Error<'_>> {
4848
self.as_slice().map(Error)
4949
}
50-
/// Check this instance's [`as_slice()`][Borrowed::as_slice()] is a valid [`Error`] and return it.
50+
/// Check this instance's [`as_slice()`][PacketLine::as_slice()] is a valid [`Error`] and return it.
5151
///
5252
/// This works for any data received in an error [channel][crate::Channel].
5353
pub fn check_error(&self) -> Option<Error<'_>> {
@@ -64,10 +64,10 @@ impl<'a> PacketLine<'a> {
6464
self.as_slice().map(Into::into)
6565
}
6666

67-
/// Interpret the data in this [`slice`][Borrowed::as_slice()] as [`Band`] according to the given `kind` of channel.
67+
/// Interpret the data in this [`slice`][PacketLine::as_slice()] as [`Band`] according to the given `kind` of channel.
6868
///
6969
/// Note that this is only relevant in a side-band channel.
70-
/// See [`decode_band()`][Borrowed::decode_band()] in case `kind` is unknown.
70+
/// See [`decode_band()`][PacketLine::decode_band()] in case `kind` is unknown.
7171
pub fn to_band(&self, kind: Channel) -> Option<Band<'_>> {
7272
self.as_slice().map(|d| match kind {
7373
Channel::Data => Band::Data(d),
@@ -76,7 +76,7 @@ impl<'a> PacketLine<'a> {
7676
})
7777
}
7878

79-
/// Decode the band of this [`slice`][Borrowed::as_slice()], or panic if it is not actually a side-band line.
79+
/// Decode the band of this [`slice`][PacketLine::as_slice()], or panic if it is not actually a side-band line.
8080
pub fn decode_band(&self) -> Result<Band<'_>, DecodeBandError> {
8181
let d = self.as_slice().ok_or(DecodeBandError::NonDataLine)?;
8282
Ok(match d[0] {
@@ -90,7 +90,7 @@ impl<'a> PacketLine<'a> {
9090

9191
use quick_error::quick_error;
9292
quick_error! {
93-
/// The error used in [`decode_band()`][Borrowed::decode_band()].
93+
/// The error used in [`decode_band()`][PacketLine::decode_band()].
9494
#[derive(Debug)]
9595
#[allow(missing_docs)]
9696
pub enum DecodeBandError {

git-packetline/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Read and write the git packet line wire format without copying it.
22
//!
3-
//! For reading the packet line format use the [`Provider`], and for writing the `Writer`.
3+
//! For reading the packet line format use the [`StreamingPeekableIter`], and for writing the `Writer`.
44
#![forbid(unsafe_code)]
55
#![deny(rust_2018_idioms, missing_docs)]
66

git-packetline/src/read/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ where
4444
}
4545

4646
/// Returns the packet line that stopped the iteration, or
47-
/// `None` if the end wasn't reached yet, on EOF, or if [`fail_on_err_lines()`][Provider::fail_on_err_lines()] was true.
47+
/// `None` if the end wasn't reached yet, on EOF, or if [`fail_on_err_lines()`][StreamingPeekableIter::fail_on_err_lines()] was true.
4848
pub fn stopped_at(&self) -> Option<PacketLine<'static>> {
4949
self.stopped_at
5050
}
@@ -65,7 +65,7 @@ where
6565
self.reset_with(delimiters);
6666
}
6767

68-
/// Similar to [`reset()`][Provider::reset()] with support to changing the `delimiters`.
68+
/// Similar to [`reset()`][StreamingPeekableIter::reset()] with support to changing the `delimiters`.
6969
pub fn reset_with(&mut self, delimiters: &'static [PacketLine<'static>]) {
7070
self.delimiters = delimiters;
7171
self.is_done = false;
@@ -74,7 +74,7 @@ where
7474

7575
/// If `value` is `true` the provider will check for special `ERR` packet lines and stop iteration when one is encountered.
7676
///
77-
/// Use [`stopped_at()]`[Provider::stopped_at()] to inspect the cause of the end of the iteration.
77+
/// Use [`stopped_at()]`[StreamingPeekableIter::stopped_at()] to inspect the cause of the end of the iteration.
7878
/// ne
7979
pub fn fail_on_err_lines(&mut self, value: bool) {
8080
self.fail_on_err_lines = value;
@@ -148,7 +148,7 @@ where
148148
/// Returns `None` if the end of iteration is reached because of one of the following:
149149
///
150150
/// * natural EOF
151-
/// * ERR packet line encountered if [`fail_on_err_lines()`][Provider::fail_on_err_lines()] is true.
151+
/// * ERR packet line encountered if [`fail_on_err_lines()`][StreamingPeekableIter::fail_on_err_lines()] is true.
152152
/// * A `delimiter` packet line encountered
153153
pub fn read_line(&mut self) -> Option<io::Result<Result<PacketLine<'_>, decode::Error>>> {
154154
if self.is_done {
@@ -226,15 +226,15 @@ where
226226
WithSidebands::with_progress_handler(self, handle_progress)
227227
}
228228

229-
/// Same as [`as_read_with_sidebands(…)`][Provider::as_read_with_sidebands()], but for channels without side band support.
229+
/// Same as [`as_read_with_sidebands(…)`][StreamingPeekableIter::as_read_with_sidebands()], but for channels without side band support.
230230
///
231231
/// The type parameter `F` needs to be configured for this method to be callable using the 'turbofish' operator.
232-
/// Use [`as_read()`][Provider::as_read()].
232+
/// Use [`as_read()`][StreamingPeekableIter::as_read()].
233233
pub fn as_read_without_sidebands<F: FnMut(bool, &[u8])>(&mut self) -> WithSidebands<'_, T, F> {
234234
WithSidebands::without_progress_handler(self)
235235
}
236236

237-
/// Same as [`as_read_with_sidebands(…)`][Provider::as_read_with_sidebands()], but for channels without side band support.
237+
/// Same as [`as_read_with_sidebands(…)`][StreamingPeekableIter::as_read_with_sidebands()], but for channels without side band support.
238238
///
239239
/// Due to the preconfigured function type this method can be called without 'turbofish'.
240240
pub fn as_read(&mut self) -> WithSidebands<'_, T, fn(bool, &[u8])> {

git-packetline/src/read/sidebands.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ where
7878
}
7979
}
8080

81-
/// Forwards to the parent [Provider::reset_with()]
81+
/// Forwards to the parent [StreamingPeekableIter::reset_with()]
8282
pub fn reset_with(&mut self, delimiters: &'static [PacketLine<'static>]) {
8383
self.parent.reset_with(delimiters)
8484
}
8585

86-
/// Forwards to the parent [Provider::stopped_at()]
86+
/// Forwards to the parent [StreamingPeekableIter::stopped_at()]
8787
pub fn stopped_at(&self) -> Option<PacketLine<'static>> {
8888
self.parent.stopped_at
8989
}
@@ -93,7 +93,7 @@ where
9393
self.handle_progress = handle_progress;
9494
}
9595

96-
/// Effectively forwards to the parent [Provider::peek_line()], allowing to see what would be returned
96+
/// Effectively forwards to the parent [StreamingPeekableIter::peek_line()], allowing to see what would be returned
9797
/// next on a call to [`read_line()`][io::BufRead::read_line()].
9898
pub fn peek_data_line(&mut self) -> Option<io::Result<Result<&[u8], crate::decode::Error>>> {
9999
match self.parent.peek_line() {

0 commit comments

Comments
 (0)