Skip to content

Commit

Permalink
Doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhickman committed Nov 11, 2023
1 parent 999b747 commit 851ab4f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,6 @@ assert_eq!(dynamic_message.get_field_by_name("foo").unwrap().as_ref(), &Value::I

### Example - implementing `ReflectMessage`

The [`ReflectMessage`] trait provides a `.descriptor()` method to get type information for a message. By default it is just implemented for `DynamicMessage`.

The [`ReflectMessage`] trait provides a `.descriptor()` method to get type information for a message. It is implemented for `DynamicMessage` and the well-known-types provided by [`prost-types`](https://docs.rs/prost-types/0.10.0/prost_types).

When the `derive` feature is enabled, it can be derived for [`Message`][prost::Message] implementations. The
Expand Down
2 changes: 0 additions & 2 deletions prost-reflect/doc/reflect.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
The [`ReflectMessage`] trait provides a `.descriptor()` method to get type information for a message. By default it is just implemented for `DynamicMessage`.

The [`ReflectMessage`] trait provides a `.descriptor()` method to get type information for a message. It is implemented for `DynamicMessage` and the well-known-types provided by [`prost-types`](https://docs.rs/prost-types/0.10.0/prost_types).

When the `derive` feature is enabled, it can be derived for [`Message`][prost::Message] implementations. The
Expand Down
4 changes: 2 additions & 2 deletions prost-reflect/src/descriptor/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ impl DescriptorPool {
/// All types referenced by the file must be defined either in the file itself, or in a file
/// previously added to the pool.
///
/// If the file is a duplicate of a files already in the pool, it will be skipped. Note this may cause issues when trying to add two different versions of a file with the same name.
/// If the file is a duplicate of a file already in the pool, it will be skipped. Note this may cause issues when trying to add two different versions of a file with the same name.
///
/// # Errors
///
Expand All @@ -253,7 +253,7 @@ impl DescriptorPool {
/// Unlike when using [`add_file_descriptor_proto()`][DescriptorPool::add_file_descriptor_proto], any extension options
/// defined in the file descriptor are preserved.
///
/// If the file is a duplicate of a files already in the pool, it will be skipped. Note this may cause issues when trying to add two different versions of a file with the same name.
/// If the file is a duplicate of a file already in the pool, it will be skipped. Note this may cause issues when trying to add two different versions of a file with the same name.
///
/// # Errors
///
Expand Down
2 changes: 1 addition & 1 deletion prost-reflect/src/descriptor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ type EnumValueIndex = DescriptorIndex;
/// Methods like [`MessageDescriptor::extensions`] will be scoped to just the files contained within the parent
/// `DescriptorPool`.
///
/// This type is uses reference counting internally so it is cheap to clone. Modifying an instance of a
/// This type uses reference counting internally so it is cheap to clone. Modifying an instance of a
/// pool will not update any existing clones of the instance.
#[derive(Clone, Default)]
pub struct DescriptorPool {
Expand Down

0 comments on commit 851ab4f

Please sign in to comment.