diff options
Diffstat (limited to 'src/oneof.rs')
-rw-r--r-- | src/oneof.rs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/oneof.rs b/src/oneof.rs index e767709..44201ea 100644 --- a/src/oneof.rs +++ b/src/oneof.rs @@ -1,5 +1,7 @@ //! Oneof-related codegen functions. +use std::collections::HashSet; + use code_writer::CodeWriter; use field::FieldElem; use field::FieldGen; @@ -14,7 +16,6 @@ use scope::OneofWithContext; use scope::RootScope; use scope::WithScope; use serde; -use std::collections::HashSet; use Customize; // oneof one { ... } @@ -78,12 +79,12 @@ impl<'a> OneofField<'a> { #[derive(Clone)] pub(crate) struct OneofVariantGen<'a> { - oneof: &'a OneofGen<'a>, - variant: OneofVariantWithContext<'a>, + _oneof: &'a OneofGen<'a>, + _variant: OneofVariantWithContext<'a>, oneof_field: OneofField<'a>, pub field: FieldGen<'a>, path: String, - customize: Customize, + _customize: Customize, } impl<'a> OneofVariantGen<'a> { @@ -95,8 +96,8 @@ impl<'a> OneofVariantGen<'a> { customize: Customize, ) -> OneofVariantGen<'a> { OneofVariantGen { - oneof, - variant: variant.clone(), + _oneof: oneof, + _variant: variant.clone(), field: field.clone(), path: format!( "{}::{}", @@ -109,7 +110,7 @@ impl<'a> OneofVariantGen<'a> { field.oneof().elem.clone(), oneof.message.root_scope, ), - customize, + _customize: customize, } } @@ -128,7 +129,6 @@ pub(crate) struct OneofGen<'a> { message: &'a MessageGen<'a>, pub oneof: OneofWithContext<'a>, type_name: RustType, - lite_runtime: bool, customize: Customize, } @@ -143,7 +143,6 @@ impl<'a> OneofGen<'a> { message, oneof, type_name: RustType::Oneof(rust_name.to_string()), - lite_runtime: message.lite_runtime, customize: customize.clone(), } } |