diff options
Diffstat (limited to 'src/scope.rs')
-rw-r--r-- | src/scope.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/scope.rs b/src/scope.rs index 87faf1f..5f92d08 100644 --- a/src/scope.rs +++ b/src/scope.rs @@ -1,3 +1,10 @@ +use protobuf::descriptor::DescriptorProto; +use protobuf::descriptor::EnumDescriptorProto; +use protobuf::descriptor::EnumValueDescriptorProto; +use protobuf::descriptor::FieldDescriptorProto; +use protobuf::descriptor::FileDescriptorProto; +use protobuf::descriptor::OneofDescriptorProto; + use crate::field::rust_field_name_for_protobuf_field_name; use crate::file::proto_path_to_rust_mod; use crate::protobuf_name::ProtobufAbsolutePath; @@ -7,12 +14,6 @@ use crate::rust; use crate::rust_name::RustIdent; use crate::rust_name::RustIdentWithPath; use crate::syntax::Syntax; -use protobuf::descriptor::DescriptorProto; -use protobuf::descriptor::EnumDescriptorProto; -use protobuf::descriptor::EnumValueDescriptorProto; -use protobuf::descriptor::FieldDescriptorProto; -use protobuf::descriptor::FileDescriptorProto; -use protobuf::descriptor::OneofDescriptorProto; pub(crate) struct RootScope<'a> { pub file_descriptors: &'a [FileDescriptorProto], @@ -395,7 +396,7 @@ impl<'a> EnumWithScope<'a> { .get_value() .iter() .map(|v| EnumValueWithContext { - en: self.clone(), + _en: self.clone(), proto: v, }) .collect() @@ -412,7 +413,7 @@ impl<'a> EnumWithScope<'a> { #[derive(Clone, Debug)] pub(crate) struct EnumValueWithContext<'a> { - pub en: EnumWithScope<'a>, + _en: EnumWithScope<'a>, pub proto: &'a EnumValueDescriptorProto, } |