Skip to content

Commit

Permalink
docs: Fix broken link warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
caspermeijn committed May 27, 2024
1 parent eec717b commit 3aeecdb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions prost-build/src/code_generator/c_escaping.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use log::debug;

/// Based on [`google::protobuf::UnescapeCEscapeString`][1]
///
/// [1]: https://github.com/google/protobuf/blob/3.3.x/src/google/protobuf/stubs/strutil.cc#L312-L322
pub(super) fn unescape_c_escape_string(s: &str) -> Vec<u8> {
let src = s.as_bytes();
Expand Down
2 changes: 1 addition & 1 deletion prost-build/src/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub(crate) enum MapType {
#[non_exhaustive]
#[derive(Default, Clone, Copy, Debug, PartialEq)]
pub(crate) enum BytesType {
/// The [`alloc::collections::Vec::<u8>`] type.
/// The [`prost::alloc::vec::Vec<u8>`] type.
#[default]
Vec,
/// The [`bytes::Bytes`] type.
Expand Down
2 changes: 1 addition & 1 deletion prost-build/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,7 @@ impl Config {
///
/// This is generally used when control over the output should not be managed by Prost,
/// such as in a flow for a `protoc` code generating plugin. When compiling as part of a
/// `build.rs` file, instead use [`compile_protos()`].
/// `build.rs` file, instead use [`Self::compile_protos()`].
pub fn generate(
&mut self,
requests: Vec<(Module, FileDescriptorProto)>,
Expand Down
6 changes: 4 additions & 2 deletions prost-build/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@ pub fn compile_protos(protos: &[impl AsRef<Path>], includes: &[impl AsRef<Path>]
/// This function can be combined with a crate like [`protox`] which outputs a
/// [`FileDescriptorSet`] and is a pure Rust implementation of `protoc`.
///
/// [`protox`]: https://github.com/andrewhickman/protox
///
/// # Example
/// ```rust,no_run
/// # use prost_types::FileDescriptorSet;
Expand All @@ -269,6 +267,10 @@ pub fn compile_protos(protos: &[impl AsRef<Path>], includes: &[impl AsRef<Path>]
/// prost_build::compile_fds(file_descriptor_set)
/// }
/// ```
///
/// [`protox`]: https://github.com/andrewhickman/protox
/// [1]: https://doc.rust-lang.org/std/macro.include.html
/// [2]: http://doc.crates.io/build-script.html#case-study-code-generation
pub fn compile_fds(fds: FileDescriptorSet) -> Result<()> {
Config::new().compile_fds(fds)
}
Expand Down
2 changes: 1 addition & 1 deletion prost/src/name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub trait Name: Message {
/// Type URL for this [`Message`], which by default is the full name with a
/// leading slash, but may also include a leading domain name, e.g.
/// `type.googleapis.com/google.profile.Person`.
/// This can be used when serializing with the [`Any`] type.
/// This can be used when serializing into the `google.protobuf.Any` type.
fn type_url() -> String {
format!("/{}", Self::full_name())
}
Expand Down
2 changes: 1 addition & 1 deletion tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub mod oneof_attributes {
include!(concat!(env!("OUT_DIR"), "/foo.custom.one_of_attrs.rs"));
}

/// Issue https://github.com/tokio-rs/prost/issues/118
/// Issue <https://github.com/tokio-rs/prost/issues/118>
///
/// When a message contains an enum field with a default value, we
/// must ensure that the appropriate name conventions are used.
Expand Down

0 comments on commit 3aeecdb

Please sign in to comment.