Check documentation intra-link (#1432)

* Fix broken links in rustdoc

This fixes all of the rustdoc warnings on nightly.

* Check documentation intra-link

* Fix config

* Fix bad indent

* Make nightly explicit

* More links fixes

* Fix link broken after master merge

Co-authored-by: Demi Obenour <48690212+DemiMarie-parity@users.noreply.github.com>
This commit is contained in:
Pierre Krieger
2020-02-10 15:17:08 +01:00
committed by GitHub
parent 1eff4b9823
commit fc4dec581e
23 changed files with 72 additions and 49 deletions

View File

@ -284,10 +284,10 @@ impl<R> LengthDelimitedReader<R> {
/// # Panic
///
/// Will panic if called while there is data in the read or write buffer.
/// The read buffer is guaranteed to be empty whenever `Stream::poll` yields
/// The read buffer is guaranteed to be empty whenever [`Stream::poll`] yields
/// a new `Message`. The write buffer is guaranteed to be empty whenever
/// [`poll_write_buffer`] yields `Async::Ready` or after the `Sink` has been
/// completely flushed via [`Sink::poll_complete`].
/// [`LengthDelimited::poll_write_buffer`] yields [`Async::Ready`] or after
/// the [`Sink`] has been completely flushed via [`Sink::poll_complete`].
pub fn into_inner(self) -> (R, BytesMut) {
self.inner.into_inner()
}

View File

@ -62,7 +62,7 @@ impl<TInner: AsyncRead + AsyncWrite> Future for NegotiatedComplete<TInner> {
}
impl<TInner> Negotiated<TInner> {
/// Creates a `Negotiated` in state [`State::Complete`], possibly
/// Creates a `Negotiated` in state [`State::Completed`], possibly
/// with `remaining` data to be sent.
pub(crate) fn completed(io: TInner, remaining: BytesMut) -> Self {
Negotiated { state: State::Completed { io, remaining } }

View File

@ -62,8 +62,8 @@ const MSG_LS: &[u8] = b"ls\n";
pub enum Version {
/// Version 1 of the multistream-select protocol. See [1] and [2].
///
/// [1] https://github.com/libp2p/specs/blob/master/connections/README.md#protocol-negotiation
/// [2] https://github.com/multiformats/multistream-select
/// [1]: https://github.com/libp2p/specs/blob/master/connections/README.md#protocol-negotiation
/// [2]: https://github.com/multiformats/multistream-select
V1,
/// A lazy variant of version 1 that is identical on the wire but delays
/// sending of protocol negotiation data as much as possible.
@ -302,7 +302,7 @@ impl<R> MessageIO<R> {
///
/// Panics if the read buffer is not empty, meaning that an incoming
/// protocol negotiation frame has been partially read. The read buffer
/// is guaranteed to be empty whenever [`MessageIO::poll`] returned
/// is guaranteed to be empty whenever `MessageIO::poll` returned
/// a message.
pub fn into_inner(self) -> (R, BytesMut) {
self.inner.into_inner()
@ -368,7 +368,7 @@ impl<R> MessageReader<R> {
///
/// Panics if the read buffer is not empty, meaning that an incoming
/// protocol negotiation frame has been partially read. The read buffer
/// is guaranteed to be empty whenever [`MessageReader::poll`] returned
/// is guaranteed to be empty whenever `MessageReader::poll` returned
/// a message.
pub fn into_inner(self) -> (R, BytesMut) {
self.inner.into_inner()