chore: Fix doc warning (#1214)
* chore(docs): Fix lint warning * chore: Add ci to check cargo doc
This commit is contained in:
@@ -39,6 +39,26 @@ jobs:
|
|||||||
- name: Check all targets
|
- name: Check all targets
|
||||||
run: cargo check --all --all-targets --all-features
|
run: cargo check --all --all-targets --all-features
|
||||||
|
|
||||||
|
check-docs:
|
||||||
|
name: check docs
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "-D warnings"
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Install Protoc
|
||||||
|
uses: arduino/setup-protoc@v1
|
||||||
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- uses: hecrj/setup-rust-action@v1
|
||||||
|
with:
|
||||||
|
rust-version: "1.60"
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
- name: cargo doc
|
||||||
|
run: cargo doc --workspace --no-deps --exclude examples
|
||||||
|
|
||||||
clippy:
|
clippy:
|
||||||
name: cargo clippy
|
name: cargo clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
pub mod proto {
|
pub mod proto {
|
||||||
#![allow(unreachable_pub)]
|
#![allow(unreachable_pub)]
|
||||||
#![allow(missing_docs)]
|
#![allow(missing_docs)]
|
||||||
|
#![allow(rustdoc::invalid_html_tags)]
|
||||||
include!("generated/grpc.reflection.v1alpha.rs");
|
include!("generated/grpc.reflection.v1alpha.rs");
|
||||||
|
|
||||||
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/reflection_v1alpha1.bin");
|
pub const FILE_DESCRIPTOR_SET: &[u8] = include_bytes!("generated/reflection_v1alpha1.bin");
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
/// Useful protobuf types
|
/// Useful protobuf types
|
||||||
pub mod pb {
|
pub mod pb {
|
||||||
|
#![allow(rustdoc::invalid_html_tags)]
|
||||||
include!("generated/google.rpc.rs");
|
include!("generated/google.rpc.rs");
|
||||||
|
|
||||||
/// Byte encoded FILE_DESCRIPTOR_SET.
|
/// Byte encoded FILE_DESCRIPTOR_SET.
|
||||||
|
|||||||
@@ -958,7 +958,7 @@ impl MetadataMap {
|
|||||||
/// use `insert_bin`.
|
/// use `insert_bin`.
|
||||||
///
|
///
|
||||||
/// This method panics when the given key is a string and it cannot be
|
/// This method panics when the given key is a string and it cannot be
|
||||||
/// converted to a MetadataKey<Ascii>.
|
/// converted to a `MetadataKey<Ascii>`.
|
||||||
///
|
///
|
||||||
/// If the map did not previously have this key present, then `None` is
|
/// If the map did not previously have this key present, then `None` is
|
||||||
/// returned.
|
/// returned.
|
||||||
@@ -1008,7 +1008,7 @@ impl MetadataMap {
|
|||||||
/// Like insert, but for Binary keys (for example "trace-proto-bin").
|
/// Like insert, but for Binary keys (for example "trace-proto-bin").
|
||||||
///
|
///
|
||||||
/// This method panics when the given key is a string and it cannot be
|
/// This method panics when the given key is a string and it cannot be
|
||||||
/// converted to a MetadataKey<Binary>.
|
/// converted to a `MetadataKey<Binary>`.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
@@ -1050,7 +1050,7 @@ impl MetadataMap {
|
|||||||
/// use `append_bin`.
|
/// use `append_bin`.
|
||||||
///
|
///
|
||||||
/// This method panics when the given key is a string and it cannot be
|
/// This method panics when the given key is a string and it cannot be
|
||||||
/// converted to a MetadataKey<Ascii>.
|
/// converted to a `MetadataKey<Ascii>`.
|
||||||
///
|
///
|
||||||
/// If the map did not previously have this key present, then `false` is
|
/// If the map did not previously have this key present, then `false` is
|
||||||
/// returned.
|
/// returned.
|
||||||
@@ -1099,7 +1099,7 @@ impl MetadataMap {
|
|||||||
/// Like append, but for binary keys (for example "trace-proto-bin").
|
/// Like append, but for binary keys (for example "trace-proto-bin").
|
||||||
///
|
///
|
||||||
/// This method panics when the given key is a string and it cannot be
|
/// This method panics when the given key is a string and it cannot be
|
||||||
/// converted to a MetadataKey<Binary>.
|
/// converted to a `MetadataKey<Binary>`.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ impl<VE: ValueEncoding> MetadataValue<VE> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Convert a `Bytes` directly into a `MetadataValue` without validating.
|
/// Convert a `Bytes` directly into a `MetadataValue` without validating.
|
||||||
/// For MetadataValue<Binary> the provided parameter must be base64
|
/// For `MetadataValue<Binary>` the provided parameter must be base64
|
||||||
/// encoded without padding bytes at the end.
|
/// encoded without padding bytes at the end.
|
||||||
///
|
///
|
||||||
/// # Safety
|
/// # Safety
|
||||||
@@ -459,7 +459,7 @@ impl MetadataValue<Ascii> {
|
|||||||
src.parse()
|
src.parse()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Converts a MetadataKey into a MetadataValue<Ascii>.
|
/// Converts a MetadataKey into a `MetadataValue<Ascii>`.
|
||||||
///
|
///
|
||||||
/// Since every valid MetadataKey is a valid MetadataValue this is done
|
/// Since every valid MetadataKey is a valid MetadataValue this is done
|
||||||
/// infallibly.
|
/// infallibly.
|
||||||
@@ -478,9 +478,9 @@ impl MetadataValue<Ascii> {
|
|||||||
|
|
||||||
/// Returns the length of `self`, in bytes.
|
/// Returns the length of `self`, in bytes.
|
||||||
///
|
///
|
||||||
/// This method is not available for MetadataValue<Binary> because that
|
/// This method is not available for `MetadataValue<Binary>` because that
|
||||||
/// cannot be implemented in constant time, which most people would probably
|
/// cannot be implemented in constant time, which most people would probably
|
||||||
/// expect. To get the length of MetadataValue<Binary>, convert it to a
|
/// expect. To get the length of `MetadataValue<Binary>`, convert it to a
|
||||||
/// Bytes value and measure its length.
|
/// Bytes value and measure its length.
|
||||||
///
|
///
|
||||||
/// # Examples
|
/// # Examples
|
||||||
|
|||||||
Reference in New Issue
Block a user