Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Fix rustdoc warning #779

Merged
merged 2 commits into from
Dec 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ instructions for `protoc` please check out the [protobuf install] instructions.

### Packages

Prost can now generate code for `.proto` files that don't have a package spec.
Prost can now generate code for `.proto` files that don't have a package spec.
`prost` will translate the Protobuf package into
a Rust module. For example, given the `package` specifier:

Expand Down Expand Up @@ -139,7 +139,7 @@ enum PhoneType {
}
```

gets this corresponding Rust enum [1]:
gets this corresponding Rust enum [^1]:

```rust,ignore
pub enum PhoneType {
Expand All @@ -149,6 +149,8 @@ pub enum PhoneType {
}
```

[^1]: Annotations have been elided for clarity. See below for a full example.

You can convert a `PhoneType` value to an `i32` by doing:

```rust,ignore
Expand Down Expand Up @@ -191,7 +193,7 @@ message PhoneNumber {
}
```

will become the following Rust type [1] with methods `type` and `set_type`:
will become the following Rust type [^2] with methods `type` and `set_type`:

```rust,ignore
pub struct PhoneNumber {
Expand All @@ -212,7 +214,7 @@ The `enum` type isn't used directly as a field, because the Protobuf spec
mandates that enumerations values are 'open', and decoding unrecognized
enumeration values must be possible.

[1] Annotations have been elided for clarity. See below for a full example.
[^2]: Annotations have been elided for clarity. See below for a full example.

#### Field Modifiers

Expand Down Expand Up @@ -264,7 +266,7 @@ message Foo {
}
```

generates the following Rust[1]:
generates the following Rust[^3]:

```rust,ignore
pub struct Foo {
Expand All @@ -280,7 +282,7 @@ pub mod foo {

`oneof` fields are always wrapped in an `Option`.

[1] Annotations have been elided for clarity. See below for a full example.
[^3]: Annotations have been elided for clarity. See below for a full example.

### Services

Expand Down Expand Up @@ -492,6 +494,6 @@ configured with the required dependencies to compile the whole project.

`prost` is distributed under the terms of the Apache License (Version 2.0).

See [LICENSE](LICENSE) for details.
See [LICENSE](https://github.com/tokio-rs/prost/blob/master/LICENSE) for details.

Copyright 2022 Dan Burkert & Tokio Contributors