-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the path for google/protobuf/empty.proto in pbtest
- Loading branch information
Showing
9 changed files
with
110 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,4 +24,4 @@ | |
#[macro_use] | ||
extern crate lazy_static; | ||
|
||
pub mod empty; | ||
pub mod protobuf; |
70 changes: 70 additions & 0 deletions
70
pb-test/gen/pb-jelly/proto_google/src/protobuf/empty.rs.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// @generated, do not edit | ||
/// A generic empty message that you can re-use to avoid defining duplicated | ||
/// empty messages in your APIs. A typical example is to use it as the request | ||
/// or the response type of an API method. For instance: | ||
|
||
/// service Foo { | ||
/// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); | ||
/// } | ||
|
||
/// The JSON representation for `Empty` is empty JSON object `{}`. | ||
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)] | ||
pub struct Empty { | ||
} | ||
impl ::std::default::Default for Empty { | ||
fn default() -> Self { | ||
Empty { | ||
} | ||
} | ||
} | ||
lazy_static! { | ||
pub static ref Empty_default: Empty = Empty::default(); | ||
} | ||
impl ::pb_jelly::Message for Empty { | ||
fn descriptor(&self) -> ::std::option::Option<::pb_jelly::MessageDescriptor> { | ||
Some(::pb_jelly::MessageDescriptor { | ||
name: "Empty", | ||
full_name: "google.protobuf.Empty", | ||
fields: &[ | ||
], | ||
oneofs: &[ | ||
], | ||
}) | ||
} | ||
fn compute_size(&self) -> usize { | ||
0 | ||
} | ||
fn compute_grpc_slices_size(&self) -> usize { | ||
0 | ||
} | ||
fn serialize<W: ::pb_jelly::PbBufferWriter>(&self, w: &mut W) -> ::std::io::Result<()> { | ||
Ok(()) | ||
} | ||
fn deserialize<B: ::pb_jelly::PbBufferReader>(&mut self, mut buf: &mut B) -> ::std::io::Result<()> { | ||
while let Some((field_number, typ)) = ::pb_jelly::wire_format::read(&mut buf)? { | ||
match field_number { | ||
_ => { | ||
::pb_jelly::skip(typ, &mut buf)?; | ||
} | ||
} | ||
} | ||
Ok(()) | ||
} | ||
} | ||
impl ::pb_jelly::Reflection for Empty { | ||
fn which_one_of(&self, oneof_name: &str) -> ::std::option::Option<&'static str> { | ||
match oneof_name { | ||
_ => { | ||
panic!("unknown oneof name given"); | ||
} | ||
} | ||
} | ||
fn get_field_mut(&mut self, field_name: &str) -> ::pb_jelly::reflection::FieldMut<'_> { | ||
match field_name { | ||
_ => { | ||
panic!("unknown field name given") | ||
} | ||
} | ||
} | ||
} | ||
|
3 changes: 3 additions & 0 deletions
3
pb-test/gen/pb-jelly/proto_google/src/protobuf/mod.rs.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// @generated, do not edit | ||
|
||
pub mod empty; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters