Skip to content

Commit

Permalink
Remove unused fields
Browse files Browse the repository at this point in the history
  • Loading branch information
goffrie committed Feb 12, 2024
1 parent c806787 commit ce3eab4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pb-jelly-gen/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ fn camelcase(underscored: &str) -> String {
struct RustType<'a> {
ctx: &'a Context<'a>,
proto_file: &'a FileDescriptorProto,
msg_type: Option<&'a DescriptorProto>,
field: &'a FieldDescriptorProto,
is_proto3: bool,
oneof: Option<&'a OneofDescriptorProto>,
Expand All @@ -253,7 +252,6 @@ impl<'a> RustType<'a> {
RustType {
ctx,
proto_file,
msg_type,
field,
is_proto3,
oneof,
Expand Down Expand Up @@ -830,7 +828,6 @@ fn field_iter<'a, 'ctx, F>(
struct CodeWriter<'a, 'ctx> {
ctx: &'ctx Context<'a>,
proto_file: &'a FileDescriptorProto,
crate_name: &'a str,
mod_parts: &'a [String],
indentation: u32,
content: String,
Expand All @@ -843,13 +840,11 @@ impl<'a, 'ctx> CodeWriter<'a, 'ctx> {
fn new(
ctx: &'ctx Context<'a>,
proto_file: &'a FileDescriptorProto,
crate_name: &'a str,
mod_parts: &'a [String],
) -> CodeWriter<'a, 'ctx> {
CodeWriter {
ctx,
proto_file,
crate_name,
mod_parts,
indentation: 0,
content: String::new(),
Expand Down Expand Up @@ -2692,7 +2687,7 @@ fn generate_single_crate(
.find(|f| f.get_name() == proto_file_name)
.unwrap();
let mod_parts = &[parent_mods, &[mod_name.clone()]].concat();
let mut writer = CodeWriter::new(ctx, proto_file, &crate_name, mod_parts);
let mut writer = CodeWriter::new(ctx, proto_file, mod_parts);
if writer.derive_serde {
derive_serde = true;
}
Expand Down

0 comments on commit ce3eab4

Please sign in to comment.