diff --git a/pilota-build/src/codegen/thrift/mod.rs b/pilota-build/src/codegen/thrift/mod.rs index c978ca3c..954454db 100644 --- a/pilota-build/src/codegen/thrift/mod.rs +++ b/pilota-build/src/codegen/thrift/mod.rs @@ -256,14 +256,14 @@ impl ThriftBackend { .fields .iter() .filter(|f| !f.is_optional() && self.default_val(f).is_none()) - .map(|f| f.local_var_name()) + .map(|f| (self.rust_name(f.did), f.local_var_name())) .collect_vec(); let verify_required_fields = required_without_default_fields .iter() - .map(|s| { + .map(|(s, v)| { format!( - r#"let Some({s}) = {s} else {{ + r#"let Some({v}) = {v} else {{ return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, diff --git a/pilota-build/test_data/plugin/serde.rs b/pilota-build/test_data/plugin/serde.rs index 7c46e86a..3836f365 100644 --- a/pilota-build/test_data/plugin/serde.rs +++ b/pilota-build/test_data/plugin/serde.rs @@ -91,13 +91,13 @@ pub mod serde { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field a is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field b is required".to_string(), )); }; @@ -167,7 +167,7 @@ pub mod serde { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field a is required".to_string(), ), ); }; @@ -175,7 +175,7 @@ pub mod serde { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field b is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/apache.rs b/pilota-build/test_data/thrift/apache.rs index 10115399..5ebfefcb 100644 --- a/pilota-build/test_data/thrift/apache.rs +++ b/pilota-build/test_data/thrift/apache.rs @@ -564,7 +564,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -624,7 +624,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -728,7 +728,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -797,7 +797,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -1192,7 +1192,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -1258,7 +1258,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -1491,7 +1491,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field s is required".to_string(), )); }; @@ -1555,7 +1555,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field s is required".to_string(), ), ); }; @@ -1642,7 +1642,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -1702,7 +1702,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -2035,7 +2035,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -2096,7 +2096,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -2994,7 +2994,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg is required".to_string(), )); }; @@ -3055,7 +3055,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg is required".to_string(), ), ); }; @@ -4209,13 +4209,13 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), )); }; @@ -4286,7 +4286,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), ), ); }; @@ -4294,7 +4294,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), ), ); }; @@ -4582,37 +4582,37 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field arg2 is required".to_string(), )); }; let Some(var_4) = var_4 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_4 is required".to_string(), + "field arg3 is required".to_string(), )); }; let Some(var_5) = var_5 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field arg4 is required".to_string(), )); }; let Some(var_6) = var_6 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_6 is required".to_string(), + "field arg5 is required".to_string(), )); }; @@ -4731,7 +4731,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), ), ); }; @@ -4739,7 +4739,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), ), ); }; @@ -4747,7 +4747,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field arg2 is required".to_string(), ), ); }; @@ -4755,7 +4755,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_4 is required".to_string(), + "field arg3 is required".to_string(), ), ); }; @@ -4763,7 +4763,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field arg4 is required".to_string(), ), ); }; @@ -4771,7 +4771,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_6 is required".to_string(), + "field arg5 is required".to_string(), ), ); }; @@ -5041,7 +5041,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5106,7 +5106,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -5215,7 +5215,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5287,7 +5287,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -5382,7 +5382,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5443,7 +5443,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -5530,7 +5530,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5595,7 +5595,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -5683,7 +5683,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5743,7 +5743,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -5854,7 +5854,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -5926,7 +5926,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -6141,7 +6141,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -6201,7 +6201,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -6728,7 +6728,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -6788,7 +6788,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -7376,7 +7376,7 @@ pub mod apache { let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field ab is required".to_string(), )); }; @@ -7460,7 +7460,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field ab is required".to_string(), ), ); }; @@ -8392,7 +8392,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg is required".to_string(), )); }; @@ -8453,7 +8453,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg is required".to_string(), ), ); }; @@ -9122,7 +9122,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field argument is required".to_string(), )); }; @@ -9188,7 +9188,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field argument is required".to_string(), ), ); }; @@ -9534,7 +9534,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -9602,7 +9602,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -9797,7 +9797,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -9863,7 +9863,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -10009,37 +10009,37 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field arg2 is required".to_string(), )); }; let Some(var_4) = var_4 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_4 is required".to_string(), + "field arg3 is required".to_string(), )); }; let Some(var_5) = var_5 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field arg4 is required".to_string(), )); }; let Some(var_6) = var_6 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_6 is required".to_string(), + "field arg5 is required".to_string(), )); }; @@ -10158,7 +10158,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), ), ); }; @@ -10166,7 +10166,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), ), ); }; @@ -10174,7 +10174,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field arg2 is required".to_string(), ), ); }; @@ -10182,7 +10182,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_4 is required".to_string(), + "field arg3 is required".to_string(), ), ); }; @@ -10190,7 +10190,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field arg4 is required".to_string(), ), ); }; @@ -10198,7 +10198,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_6 is required".to_string(), + "field arg5 is required".to_string(), ), ); }; @@ -10515,7 +10515,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -10576,7 +10576,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -10663,7 +10663,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -10728,7 +10728,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -10956,7 +10956,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -11016,7 +11016,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -11124,7 +11124,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -11196,7 +11196,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -11433,7 +11433,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -11494,7 +11494,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -12004,7 +12004,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -12064,7 +12064,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -13772,7 +13772,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field seconds_to_sleep is required".to_string(), )); }; @@ -13834,7 +13834,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field seconds_to_sleep is required".to_string(), ), ); }; @@ -14451,7 +14451,7 @@ pub mod apache { let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field list_field is required".to_string(), )); }; @@ -14595,7 +14595,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field list_field is required".to_string(), ), ); }; @@ -14899,7 +14899,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -14960,7 +14960,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -15579,7 +15579,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field hello is required".to_string(), )); }; @@ -15639,7 +15639,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field hello is required".to_string(), ), ); }; @@ -15924,7 +15924,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -15993,7 +15993,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -16086,7 +16086,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -16152,7 +16152,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -16245,7 +16245,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field argument is required".to_string(), )); }; @@ -16311,7 +16311,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field argument is required".to_string(), ), ); }; @@ -16568,7 +16568,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -16628,7 +16628,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -16734,7 +16734,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -16802,7 +16802,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -16895,7 +16895,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -16956,7 +16956,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -17045,7 +17045,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -17111,7 +17111,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -17535,7 +17535,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -17596,7 +17596,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -17825,7 +17825,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -17885,7 +17885,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -20101,13 +20101,13 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), )); }; @@ -20178,7 +20178,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field arg0 is required".to_string(), ), ); }; @@ -20186,7 +20186,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field arg1 is required".to_string(), ), ); }; @@ -20865,7 +20865,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field seconds_to_sleep is required".to_string(), )); }; @@ -20927,7 +20927,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field seconds_to_sleep is required".to_string(), ), ); }; @@ -21479,7 +21479,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -21544,7 +21544,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -21633,7 +21633,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -21694,7 +21694,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -21805,7 +21805,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -21877,7 +21877,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -22143,7 +22143,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), )); }; @@ -22203,7 +22203,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field thing is required".to_string(), ), ); }; @@ -22290,7 +22290,7 @@ pub mod apache { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field hello is required".to_string(), )); }; @@ -22350,7 +22350,7 @@ pub mod apache { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field hello is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/auto_name.rs b/pilota-build/test_data/thrift/auto_name.rs index 80c9c4b8..1819ddc5 100644 --- a/pilota-build/test_data/thrift/auto_name.rs +++ b/pilota-build/test_data/thrift/auto_name.rs @@ -72,7 +72,7 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), )); }; @@ -136,7 +136,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), ), ); }; @@ -601,7 +601,7 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -667,7 +667,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -756,7 +756,7 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -822,7 +822,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -912,7 +912,7 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -978,7 +978,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -1209,7 +1209,7 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -1275,7 +1275,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -1516,13 +1516,13 @@ pub mod auto_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field ID is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field Id is required".to_string(), )); }; @@ -1596,7 +1596,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field ID is required".to_string(), ), ); }; @@ -1604,7 +1604,7 @@ pub mod auto_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field Id is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/binary_bytes.rs b/pilota-build/test_data/thrift/binary_bytes.rs index b9e82fc3..a1d16e98 100644 --- a/pilota-build/test_data/thrift/binary_bytes.rs +++ b/pilota-build/test_data/thrift/binary_bytes.rs @@ -81,13 +81,13 @@ pub mod binary_bytes { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), )); }; @@ -161,7 +161,7 @@ pub mod binary_bytes { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), ), ); }; @@ -169,7 +169,7 @@ pub mod binary_bytes { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/decode_error.rs b/pilota-build/test_data/thrift/decode_error.rs index 6c2bcb88..9fea690b 100644 --- a/pilota-build/test_data/thrift/decode_error.rs +++ b/pilota-build/test_data/thrift/decode_error.rs @@ -72,7 +72,7 @@ pub mod decode_error { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field b is required".to_string(), )); }; @@ -139,7 +139,7 @@ pub mod decode_error { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field b is required".to_string(), ), ); }; @@ -228,7 +228,7 @@ pub mod decode_error { let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field a is required".to_string(), )); }; @@ -292,7 +292,7 @@ pub mod decode_error { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field a is required".to_string(), ), ); }; @@ -381,7 +381,7 @@ pub mod decode_error { let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field c is required".to_string(), )); }; @@ -448,7 +448,7 @@ pub mod decode_error { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field c is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/default_value.rs b/pilota-build/test_data/thrift/default_value.rs index 1dcbf21e..527a02d5 100644 --- a/pilota-build/test_data/thrift/default_value.rs +++ b/pilota-build/test_data/thrift/default_value.rs @@ -356,11 +356,11 @@ pub mod default_value { __protocol.write_i32_field(5, (value).inner())?; } if let Some(value) = self.test_b3.as_ref() { - __protocol.write_i8_field(5, *value)?; + __protocol.write_i8_field(6, *value)?; } if let Some(value) = self.map.as_ref() { __protocol.write_map_field( - 6, + 7, ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, &value, @@ -375,17 +375,17 @@ pub mod default_value { )?; } if let Some(value) = self.test_double.as_ref() { - __protocol.write_double_field(7, *value)?; + __protocol.write_double_field(8, *value)?; } if let Some(value) = self.test_double2.as_ref() { - __protocol.write_double_field(8, *value)?; + __protocol.write_double_field(9, *value)?; } if let Some(value) = self.alias_str.as_ref() { - __protocol.write_faststr_field(9, (value).clone())?; + __protocol.write_faststr_field(10, (value).clone())?; } - __protocol.write_bytes_field(10, (&self.empty).clone())?; + __protocol.write_bytes_field(11, (&self.empty).clone())?; __protocol.write_map_field( - 11, + 12, ::pilota::thrift::TType::Double, ::pilota::thrift::TType::Double, &&self.test_map, @@ -399,7 +399,7 @@ pub mod default_value { }, )?; __protocol.write_set_field( - 12, + 13, ::pilota::thrift::TType::Double, &&self.test_set, |__protocol, val| { @@ -408,11 +408,11 @@ pub mod default_value { }, )?; if let Some(value) = self.a2.as_ref() { - __protocol.write_bool_field(13, *value)?; + __protocol.write_bool_field(14, *value)?; } if let Some(value) = self.map2.as_ref() { __protocol.write_map_field( - 14, + 15, ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, &value, @@ -442,16 +442,16 @@ pub mod default_value { let mut var_3 = Some(false); let mut var_4 = Some(B::READ); let mut var_5 = Some(B::WRITE); - let mut var_5 = Some((B::READ.inner() as i8)); - let mut var_6 = None; - let mut var_7 = Some(1f64); - let mut var_8 = Some(1.2f64); - let mut var_9 = Some(::pilota::FastStr::from_static_str(A_S)); - let mut var_10 = ::pilota::Bytes::from_static("".as_bytes()); - let mut var_11 = None; + let mut var_6 = Some((B::READ.inner() as i8)); + let mut var_7 = None; + let mut var_8 = Some(1f64); + let mut var_9 = Some(1.2f64); + let mut var_10 = Some(::pilota::FastStr::from_static_str(A_S)); + let mut var_11 = ::pilota::Bytes::from_static("".as_bytes()); let mut var_12 = None; - let mut var_13 = Some(true); - let mut var_14 = None; + let mut var_13 = None; + let mut var_14 = Some(true); + let mut var_15 = None; let mut __pilota_decoding_field_id = None; @@ -486,11 +486,11 @@ pub mod default_value { Some(5) if field_ident.field_type == ::pilota::thrift::TType::I32 => { var_5 = Some(::pilota::thrift::Message::decode(__protocol)?); } - Some(5) if field_ident.field_type == ::pilota::thrift::TType::I8 => { - var_5 = Some(__protocol.read_i8()?); + Some(6) if field_ident.field_type == ::pilota::thrift::TType::I8 => { + var_6 = Some(__protocol.read_i8()?); } - Some(6) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_6 = Some({ + Some(7) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_7 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -503,28 +503,28 @@ pub mod default_value { val }); } - Some(7) - if field_ident.field_type == ::pilota::thrift::TType::Double => - { - var_7 = Some(__protocol.read_double()?); - } Some(8) if field_ident.field_type == ::pilota::thrift::TType::Double => { var_8 = Some(__protocol.read_double()?); } Some(9) - if field_ident.field_type == ::pilota::thrift::TType::Binary => + if field_ident.field_type == ::pilota::thrift::TType::Double => { - var_9 = Some(__protocol.read_faststr()?); + var_9 = Some(__protocol.read_double()?); } Some(10) if field_ident.field_type == ::pilota::thrift::TType::Binary => { - var_10 = __protocol.read_bytes()?; + var_10 = Some(__protocol.read_faststr()?); + } + Some(11) + if field_ident.field_type == ::pilota::thrift::TType::Binary => + { + var_11 = __protocol.read_bytes()?; } - Some(11) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_11 = Some({ + Some(12) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_12 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -537,8 +537,8 @@ pub mod default_value { val }); } - Some(12) if field_ident.field_type == ::pilota::thrift::TType::Set => { - var_12 = Some({ + Some(13) if field_ident.field_type == ::pilota::thrift::TType::Set => { + var_13 = Some({ let list_ident = __protocol.read_set_begin()?; let mut val = ::pilota::AHashSet::with_capacity(list_ident.size); @@ -551,11 +551,11 @@ pub mod default_value { val }); } - Some(13) if field_ident.field_type == ::pilota::thrift::TType::Bool => { - var_13 = Some(__protocol.read_bool()?); + Some(14) if field_ident.field_type == ::pilota::thrift::TType::Bool => { + var_14 = Some(__protocol.read_bool()?); } - Some(14) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_14 = Some({ + Some(15) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_15 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -589,8 +589,8 @@ pub mod default_value { __protocol.read_struct_end()?; let var_2 = var_2.unwrap_or_else(|| "test".to_string()); - if var_6.is_none() { - var_6 = Some({ + if var_7.is_none() { + var_7 = Some({ let mut map = ::pilota::AHashMap::with_capacity(1); map.insert( ::pilota::FastStr::from_static_str("hello"), @@ -599,15 +599,15 @@ pub mod default_value { map }); } - let var_11 = var_11.unwrap_or_else(|| { + let var_12 = var_12.unwrap_or_else(|| { let mut map = ::pilota::AHashMap::with_capacity(1); map.insert(::pilota::OrderedFloat(1f64), 2f64); map }); - let var_12 = var_12 + let var_13 = var_13 .unwrap_or_else(|| ::pilota::AHashSet::from([::pilota::OrderedFloat(1f64)])); - if var_14.is_none() { - var_14 = Some(::pilota::AHashMap::new()); + if var_15.is_none() { + var_15 = Some(::pilota::AHashMap::new()); } let data = Self { @@ -616,16 +616,16 @@ pub mod default_value { a: var_3, test_b: var_4, test_b2: var_5, - test_b3: var_5, - map: var_6, - test_double: var_7, - test_double2: var_8, - alias_str: var_9, - empty: var_10, - test_map: var_11, - test_set: var_12, - a2: var_13, - map2: var_14, + test_b3: var_6, + map: var_7, + test_double: var_8, + test_double2: var_9, + alias_str: var_10, + empty: var_11, + test_map: var_12, + test_set: var_13, + a2: var_14, + map2: var_15, }; ::std::result::Result::Ok(data) } @@ -646,16 +646,16 @@ pub mod default_value { let mut var_3 = Some(false); let mut var_4 = Some(B::READ); let mut var_5 = Some(B::WRITE); - let mut var_5 = Some((B::READ.inner() as i8)); - let mut var_6 = None; - let mut var_7 = Some(1f64); - let mut var_8 = Some(1.2f64); - let mut var_9 = Some(::pilota::FastStr::from_static_str(A_S)); - let mut var_10 = ::pilota::Bytes::from_static("".as_bytes()); - let mut var_11 = None; + let mut var_6 = Some((B::READ.inner() as i8)); + let mut var_7 = None; + let mut var_8 = Some(1f64); + let mut var_9 = Some(1.2f64); + let mut var_10 = Some(::pilota::FastStr::from_static_str(A_S)); + let mut var_11 = ::pilota::Bytes::from_static("".as_bytes()); let mut var_12 = None; - let mut var_13 = Some(true); - let mut var_14 = None; + let mut var_13 = None; + let mut var_14 = Some(true); + let mut var_15 = None; let mut __pilota_decoding_field_id = None; @@ -702,15 +702,15 @@ pub mod default_value { .await?, ); } - Some(5) + Some(6) if field_ident.field_type == ::pilota::thrift::TType::I8 => { - var_5 = Some(__protocol.read_i8().await?); + var_6 = Some(__protocol.read_i8().await?); } - Some(6) + Some(7) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_6 = Some({ + var_7 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -724,12 +724,6 @@ pub mod default_value { val }); } - Some(7) - if field_ident.field_type - == ::pilota::thrift::TType::Double => - { - var_7 = Some(__protocol.read_double().await?); - } Some(8) if field_ident.field_type == ::pilota::thrift::TType::Double => @@ -738,20 +732,26 @@ pub mod default_value { } Some(9) if field_ident.field_type - == ::pilota::thrift::TType::Binary => + == ::pilota::thrift::TType::Double => { - var_9 = Some(__protocol.read_faststr().await?); + var_9 = Some(__protocol.read_double().await?); } Some(10) if field_ident.field_type == ::pilota::thrift::TType::Binary => { - var_10 = __protocol.read_bytes().await?; + var_10 = Some(__protocol.read_faststr().await?); } Some(11) + if field_ident.field_type + == ::pilota::thrift::TType::Binary => + { + var_11 = __protocol.read_bytes().await?; + } + Some(12) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_11 = Some({ + var_12 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -767,10 +767,10 @@ pub mod default_value { val }); } - Some(12) + Some(13) if field_ident.field_type == ::pilota::thrift::TType::Set => { - var_12 = Some({ + var_13 = Some({ let list_ident = __protocol.read_set_begin().await?; let mut val = ::pilota::AHashSet::with_capacity(list_ident.size); @@ -783,15 +783,15 @@ pub mod default_value { val }); } - Some(13) + Some(14) if field_ident.field_type == ::pilota::thrift::TType::Bool => { - var_13 = Some(__protocol.read_bool().await?); + var_14 = Some(__protocol.read_bool().await?); } - Some(14) + Some(15) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_14 = Some({ + var_15 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -827,8 +827,8 @@ pub mod default_value { __protocol.read_struct_end().await?; let var_2 = var_2.unwrap_or_else(|| "test".to_string()); - if var_6.is_none() { - var_6 = Some({ + if var_7.is_none() { + var_7 = Some({ let mut map = ::pilota::AHashMap::with_capacity(1); map.insert( ::pilota::FastStr::from_static_str("hello"), @@ -837,16 +837,16 @@ pub mod default_value { map }); } - let var_11 = var_11.unwrap_or_else(|| { + let var_12 = var_12.unwrap_or_else(|| { let mut map = ::pilota::AHashMap::with_capacity(1); map.insert(::pilota::OrderedFloat(1f64), 2f64); map }); - let var_12 = var_12.unwrap_or_else(|| { + let var_13 = var_13.unwrap_or_else(|| { ::pilota::AHashSet::from([::pilota::OrderedFloat(1f64)]) }); - if var_14.is_none() { - var_14 = Some(::pilota::AHashMap::new()); + if var_15.is_none() { + var_15 = Some(::pilota::AHashMap::new()); } let data = Self { @@ -855,16 +855,16 @@ pub mod default_value { a: var_3, test_b: var_4, test_b2: var_5, - test_b3: var_5, - map: var_6, - test_double: var_7, - test_double2: var_8, - alias_str: var_9, - empty: var_10, - test_map: var_11, - test_set: var_12, - a2: var_13, - map2: var_14, + test_b3: var_6, + map: var_7, + test_double: var_8, + test_double2: var_9, + alias_str: var_10, + empty: var_11, + test_map: var_12, + test_set: var_13, + a2: var_14, + map2: var_15, }; ::std::result::Result::Ok(data) }) @@ -889,10 +889,10 @@ pub mod default_value { + self .test_b3 .as_ref() - .map_or(0, |value| __protocol.i8_field_len(Some(5), *value)) + .map_or(0, |value| __protocol.i8_field_len(Some(6), *value)) + self.map.as_ref().map_or(0, |value| { __protocol.map_field_len( - Some(6), + Some(7), ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, value, @@ -903,18 +903,18 @@ pub mod default_value { + self .test_double .as_ref() - .map_or(0, |value| __protocol.double_field_len(Some(7), *value)) + .map_or(0, |value| __protocol.double_field_len(Some(8), *value)) + self .test_double2 .as_ref() - .map_or(0, |value| __protocol.double_field_len(Some(8), *value)) + .map_or(0, |value| __protocol.double_field_len(Some(9), *value)) + self .alias_str .as_ref() - .map_or(0, |value| __protocol.faststr_field_len(Some(9), value)) - + __protocol.bytes_field_len(Some(10), &self.empty) + .map_or(0, |value| __protocol.faststr_field_len(Some(10), value)) + + __protocol.bytes_field_len(Some(11), &self.empty) + __protocol.map_field_len( - Some(11), + Some(12), ::pilota::thrift::TType::Double, ::pilota::thrift::TType::Double, &self.test_map, @@ -922,7 +922,7 @@ pub mod default_value { |__protocol, val| __protocol.double_len(*val), ) + __protocol.set_field_len( - Some(12), + Some(13), ::pilota::thrift::TType::Double, &self.test_set, |__protocol, el| __protocol.double_len(el.0), @@ -930,10 +930,10 @@ pub mod default_value { + self .a2 .as_ref() - .map_or(0, |value| __protocol.bool_field_len(Some(13), *value)) + .map_or(0, |value| __protocol.bool_field_len(Some(14), *value)) + self.map2.as_ref().map_or(0, |value| { __protocol.map_field_len( - Some(14), + Some(15), ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, value, diff --git a/pilota-build/test_data/thrift/default_value.thrift b/pilota-build/test_data/thrift/default_value.thrift index 3dd54dee..9db807a4 100644 --- a/pilota-build/test_data/thrift/default_value.thrift +++ b/pilota-build/test_data/thrift/default_value.thrift @@ -11,16 +11,16 @@ struct A { 3: optional bool a = false, 4: optional B test_b = B.Read, 5: optional B test_b2 = 2, - 5: optional i8 test_b3 = B.Read, - 6: optional map map = {"hello": "world"}, - 7: optional double test_double = 1, - 8: optional double test_double2 = 1.2, - 9: optional string alias_str = A_S, - 10: required binary empty = "", - 11: required map test_map = {1.0: 2.0}, - 12: required set test_set = [1.0], - 13: bool a2 = 3, - 14: map map2 = [], + 6: optional i8 test_b3 = B.Read, + 7: optional map map = {"hello": "world"}, + 8: optional double test_double = 1, + 9: optional double test_double2 = 1.2, + 10: optional string alias_str = A_S, + 11: required binary empty = "", + 12: required map test_map = {1.0: 2.0}, + 13: required set test_set = [1.0], + 14: bool a2 = 3, + 15: map map2 = [], } struct C { diff --git a/pilota-build/test_data/thrift/enum_test.rs b/pilota-build/test_data/thrift/enum_test.rs index 9965cc50..ad648b3f 100644 --- a/pilota-build/test_data/thrift/enum_test.rs +++ b/pilota-build/test_data/thrift/enum_test.rs @@ -162,7 +162,7 @@ pub mod enum_test { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -228,7 +228,7 @@ pub mod enum_test { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -318,7 +318,7 @@ pub mod enum_test { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -381,7 +381,7 @@ pub mod enum_test { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -554,7 +554,7 @@ pub mod enum_test { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -620,7 +620,7 @@ pub mod enum_test { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -856,7 +856,7 @@ pub mod enum_test { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -919,7 +919,7 @@ pub mod enum_test { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -1158,7 +1158,7 @@ pub mod enum_test { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field Index is required".to_string(), )); }; @@ -1240,7 +1240,7 @@ pub mod enum_test { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field Index is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/multi.rs b/pilota-build/test_data/thrift/multi.rs index 8e529b7f..34aaeea2 100644 --- a/pilota-build/test_data/thrift/multi.rs +++ b/pilota-build/test_data/thrift/multi.rs @@ -358,11 +358,11 @@ pub mod multi { __protocol.write_i32_field(5, (value).inner())?; } if let Some(value) = self.test_b3.as_ref() { - __protocol.write_i8_field(5, *value)?; + __protocol.write_i8_field(6, *value)?; } if let Some(value) = self.map.as_ref() { __protocol.write_map_field( - 6, + 7, ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, &value, @@ -377,17 +377,17 @@ pub mod multi { )?; } if let Some(value) = self.test_double.as_ref() { - __protocol.write_double_field(7, *value)?; + __protocol.write_double_field(8, *value)?; } if let Some(value) = self.test_double2.as_ref() { - __protocol.write_double_field(8, *value)?; + __protocol.write_double_field(9, *value)?; } if let Some(value) = self.alias_str.as_ref() { - __protocol.write_faststr_field(9, (value).clone())?; + __protocol.write_faststr_field(10, (value).clone())?; } - __protocol.write_bytes_field(10, (&self.empty).clone())?; + __protocol.write_bytes_field(11, (&self.empty).clone())?; __protocol.write_map_field( - 11, + 12, ::pilota::thrift::TType::Double, ::pilota::thrift::TType::Double, &&self.test_map, @@ -401,7 +401,7 @@ pub mod multi { }, )?; __protocol.write_set_field( - 12, + 13, ::pilota::thrift::TType::Double, &&self.test_set, |__protocol, val| { @@ -410,11 +410,11 @@ pub mod multi { }, )?; if let Some(value) = self.a2.as_ref() { - __protocol.write_bool_field(13, *value)?; + __protocol.write_bool_field(14, *value)?; } if let Some(value) = self.map2.as_ref() { __protocol.write_map_field( - 14, + 15, ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, &value, @@ -444,16 +444,16 @@ pub mod multi { let mut var_3 = Some(false); let mut var_4 = Some(B::READ); let mut var_5 = Some(B::WRITE); - let mut var_5 = Some((B::READ.inner() as i8)); - let mut var_6 = None; - let mut var_7 = Some(1f64); - let mut var_8 = Some(1.2f64); - let mut var_9 = Some(::pilota::FastStr::from_static_str(A_S)); - let mut var_10 = ::pilota::Bytes::from_static("".as_bytes()); - let mut var_11 = None; + let mut var_6 = Some((B::READ.inner() as i8)); + let mut var_7 = None; + let mut var_8 = Some(1f64); + let mut var_9 = Some(1.2f64); + let mut var_10 = Some(::pilota::FastStr::from_static_str(A_S)); + let mut var_11 = ::pilota::Bytes::from_static("".as_bytes()); let mut var_12 = None; - let mut var_13 = Some(true); - let mut var_14 = None; + let mut var_13 = None; + let mut var_14 = Some(true); + let mut var_15 = None; let mut __pilota_decoding_field_id = None; @@ -488,11 +488,11 @@ pub mod multi { Some(5) if field_ident.field_type == ::pilota::thrift::TType::I32 => { var_5 = Some(::pilota::thrift::Message::decode(__protocol)?); } - Some(5) if field_ident.field_type == ::pilota::thrift::TType::I8 => { - var_5 = Some(__protocol.read_i8()?); + Some(6) if field_ident.field_type == ::pilota::thrift::TType::I8 => { + var_6 = Some(__protocol.read_i8()?); } - Some(6) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_6 = Some({ + Some(7) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_7 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -505,28 +505,28 @@ pub mod multi { val }); } - Some(7) - if field_ident.field_type == ::pilota::thrift::TType::Double => - { - var_7 = Some(__protocol.read_double()?); - } Some(8) if field_ident.field_type == ::pilota::thrift::TType::Double => { var_8 = Some(__protocol.read_double()?); } Some(9) - if field_ident.field_type == ::pilota::thrift::TType::Binary => + if field_ident.field_type == ::pilota::thrift::TType::Double => { - var_9 = Some(__protocol.read_faststr()?); + var_9 = Some(__protocol.read_double()?); } Some(10) if field_ident.field_type == ::pilota::thrift::TType::Binary => { - var_10 = __protocol.read_bytes()?; + var_10 = Some(__protocol.read_faststr()?); + } + Some(11) + if field_ident.field_type == ::pilota::thrift::TType::Binary => + { + var_11 = __protocol.read_bytes()?; } - Some(11) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_11 = Some({ + Some(12) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_12 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -539,8 +539,8 @@ pub mod multi { val }); } - Some(12) if field_ident.field_type == ::pilota::thrift::TType::Set => { - var_12 = Some({ + Some(13) if field_ident.field_type == ::pilota::thrift::TType::Set => { + var_13 = Some({ let list_ident = __protocol.read_set_begin()?; let mut val = ::pilota::AHashSet::with_capacity(list_ident.size); @@ -553,11 +553,11 @@ pub mod multi { val }); } - Some(13) if field_ident.field_type == ::pilota::thrift::TType::Bool => { - var_13 = Some(__protocol.read_bool()?); + Some(14) if field_ident.field_type == ::pilota::thrift::TType::Bool => { + var_14 = Some(__protocol.read_bool()?); } - Some(14) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_14 = Some({ + Some(15) if field_ident.field_type == ::pilota::thrift::TType::Map => { + var_15 = Some({ let map_ident = __protocol.read_map_begin()?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); for _ in 0..map_ident.size { @@ -591,8 +591,8 @@ pub mod multi { __protocol.read_struct_end()?; let var_2 = var_2.unwrap_or_else(|| "test".to_string()); - if var_6.is_none() { - var_6 = Some({ + if var_7.is_none() { + var_7 = Some({ let mut map = ::pilota::AHashMap::with_capacity(1); map.insert( ::pilota::FastStr::from_static_str("hello"), @@ -601,15 +601,15 @@ pub mod multi { map }); } - let var_11 = var_11.unwrap_or_else(|| { + let var_12 = var_12.unwrap_or_else(|| { let mut map = ::pilota::AHashMap::with_capacity(1); map.insert(::pilota::OrderedFloat(1f64), 2f64); map }); - let var_12 = var_12 + let var_13 = var_13 .unwrap_or_else(|| ::pilota::AHashSet::from([::pilota::OrderedFloat(1f64)])); - if var_14.is_none() { - var_14 = Some(::pilota::AHashMap::new()); + if var_15.is_none() { + var_15 = Some(::pilota::AHashMap::new()); } let data = Self { @@ -618,16 +618,16 @@ pub mod multi { a: var_3, test_b: var_4, test_b2: var_5, - test_b3: var_5, - map: var_6, - test_double: var_7, - test_double2: var_8, - alias_str: var_9, - empty: var_10, - test_map: var_11, - test_set: var_12, - a2: var_13, - map2: var_14, + test_b3: var_6, + map: var_7, + test_double: var_8, + test_double2: var_9, + alias_str: var_10, + empty: var_11, + test_map: var_12, + test_set: var_13, + a2: var_14, + map2: var_15, }; ::std::result::Result::Ok(data) } @@ -648,16 +648,16 @@ pub mod multi { let mut var_3 = Some(false); let mut var_4 = Some(B::READ); let mut var_5 = Some(B::WRITE); - let mut var_5 = Some((B::READ.inner() as i8)); - let mut var_6 = None; - let mut var_7 = Some(1f64); - let mut var_8 = Some(1.2f64); - let mut var_9 = Some(::pilota::FastStr::from_static_str(A_S)); - let mut var_10 = ::pilota::Bytes::from_static("".as_bytes()); - let mut var_11 = None; + let mut var_6 = Some((B::READ.inner() as i8)); + let mut var_7 = None; + let mut var_8 = Some(1f64); + let mut var_9 = Some(1.2f64); + let mut var_10 = Some(::pilota::FastStr::from_static_str(A_S)); + let mut var_11 = ::pilota::Bytes::from_static("".as_bytes()); let mut var_12 = None; - let mut var_13 = Some(true); - let mut var_14 = None; + let mut var_13 = None; + let mut var_14 = Some(true); + let mut var_15 = None; let mut __pilota_decoding_field_id = None; @@ -704,15 +704,15 @@ pub mod multi { .await?, ); } - Some(5) + Some(6) if field_ident.field_type == ::pilota::thrift::TType::I8 => { - var_5 = Some(__protocol.read_i8().await?); + var_6 = Some(__protocol.read_i8().await?); } - Some(6) + Some(7) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_6 = Some({ + var_7 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -726,12 +726,6 @@ pub mod multi { val }); } - Some(7) - if field_ident.field_type - == ::pilota::thrift::TType::Double => - { - var_7 = Some(__protocol.read_double().await?); - } Some(8) if field_ident.field_type == ::pilota::thrift::TType::Double => @@ -740,20 +734,26 @@ pub mod multi { } Some(9) if field_ident.field_type - == ::pilota::thrift::TType::Binary => + == ::pilota::thrift::TType::Double => { - var_9 = Some(__protocol.read_faststr().await?); + var_9 = Some(__protocol.read_double().await?); } Some(10) if field_ident.field_type == ::pilota::thrift::TType::Binary => { - var_10 = __protocol.read_bytes().await?; + var_10 = Some(__protocol.read_faststr().await?); } Some(11) + if field_ident.field_type + == ::pilota::thrift::TType::Binary => + { + var_11 = __protocol.read_bytes().await?; + } + Some(12) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_11 = Some({ + var_12 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -769,10 +769,10 @@ pub mod multi { val }); } - Some(12) + Some(13) if field_ident.field_type == ::pilota::thrift::TType::Set => { - var_12 = Some({ + var_13 = Some({ let list_ident = __protocol.read_set_begin().await?; let mut val = ::pilota::AHashSet::with_capacity(list_ident.size); @@ -785,15 +785,15 @@ pub mod multi { val }); } - Some(13) + Some(14) if field_ident.field_type == ::pilota::thrift::TType::Bool => { - var_13 = Some(__protocol.read_bool().await?); + var_14 = Some(__protocol.read_bool().await?); } - Some(14) + Some(15) if field_ident.field_type == ::pilota::thrift::TType::Map => { - var_14 = Some({ + var_15 = Some({ let map_ident = __protocol.read_map_begin().await?; let mut val = ::pilota::AHashMap::with_capacity(map_ident.size); @@ -829,8 +829,8 @@ pub mod multi { __protocol.read_struct_end().await?; let var_2 = var_2.unwrap_or_else(|| "test".to_string()); - if var_6.is_none() { - var_6 = Some({ + if var_7.is_none() { + var_7 = Some({ let mut map = ::pilota::AHashMap::with_capacity(1); map.insert( ::pilota::FastStr::from_static_str("hello"), @@ -839,16 +839,16 @@ pub mod multi { map }); } - let var_11 = var_11.unwrap_or_else(|| { + let var_12 = var_12.unwrap_or_else(|| { let mut map = ::pilota::AHashMap::with_capacity(1); map.insert(::pilota::OrderedFloat(1f64), 2f64); map }); - let var_12 = var_12.unwrap_or_else(|| { + let var_13 = var_13.unwrap_or_else(|| { ::pilota::AHashSet::from([::pilota::OrderedFloat(1f64)]) }); - if var_14.is_none() { - var_14 = Some(::pilota::AHashMap::new()); + if var_15.is_none() { + var_15 = Some(::pilota::AHashMap::new()); } let data = Self { @@ -857,16 +857,16 @@ pub mod multi { a: var_3, test_b: var_4, test_b2: var_5, - test_b3: var_5, - map: var_6, - test_double: var_7, - test_double2: var_8, - alias_str: var_9, - empty: var_10, - test_map: var_11, - test_set: var_12, - a2: var_13, - map2: var_14, + test_b3: var_6, + map: var_7, + test_double: var_8, + test_double2: var_9, + alias_str: var_10, + empty: var_11, + test_map: var_12, + test_set: var_13, + a2: var_14, + map2: var_15, }; ::std::result::Result::Ok(data) }) @@ -891,10 +891,10 @@ pub mod multi { + self .test_b3 .as_ref() - .map_or(0, |value| __protocol.i8_field_len(Some(5), *value)) + .map_or(0, |value| __protocol.i8_field_len(Some(6), *value)) + self.map.as_ref().map_or(0, |value| { __protocol.map_field_len( - Some(6), + Some(7), ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, value, @@ -905,18 +905,18 @@ pub mod multi { + self .test_double .as_ref() - .map_or(0, |value| __protocol.double_field_len(Some(7), *value)) + .map_or(0, |value| __protocol.double_field_len(Some(8), *value)) + self .test_double2 .as_ref() - .map_or(0, |value| __protocol.double_field_len(Some(8), *value)) + .map_or(0, |value| __protocol.double_field_len(Some(9), *value)) + self .alias_str .as_ref() - .map_or(0, |value| __protocol.faststr_field_len(Some(9), value)) - + __protocol.bytes_field_len(Some(10), &self.empty) + .map_or(0, |value| __protocol.faststr_field_len(Some(10), value)) + + __protocol.bytes_field_len(Some(11), &self.empty) + __protocol.map_field_len( - Some(11), + Some(12), ::pilota::thrift::TType::Double, ::pilota::thrift::TType::Double, &self.test_map, @@ -924,7 +924,7 @@ pub mod multi { |__protocol, val| __protocol.double_len(*val), ) + __protocol.set_field_len( - Some(12), + Some(13), ::pilota::thrift::TType::Double, &self.test_set, |__protocol, el| __protocol.double_len(el.0), @@ -932,10 +932,10 @@ pub mod multi { + self .a2 .as_ref() - .map_or(0, |value| __protocol.bool_field_len(Some(13), *value)) + .map_or(0, |value| __protocol.bool_field_len(Some(14), *value)) + self.map2.as_ref().map_or(0, |value| { __protocol.map_field_len( - Some(14), + Some(15), ::pilota::thrift::TType::Binary, ::pilota::thrift::TType::Binary, value, diff --git a/pilota-build/test_data/thrift/normal.rs b/pilota-build/test_data/thrift/normal.rs index bd4ec396..465a08f4 100644 --- a/pilota-build/test_data/thrift/normal.rs +++ b/pilota-build/test_data/thrift/normal.rs @@ -435,25 +435,25 @@ pub mod normal { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field msg is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field msg_map is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field sub_msgs is required".to_string(), )); }; let Some(var_5) = var_5 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field flag_msg is required".to_string(), )); }; @@ -566,7 +566,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field msg is required".to_string(), ), ); }; @@ -574,7 +574,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field msg_map is required".to_string(), ), ); }; @@ -582,7 +582,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field sub_msgs is required".to_string(), ), ); }; @@ -590,7 +590,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_5 is required".to_string(), + "field flag_msg is required".to_string(), ), ); }; @@ -857,7 +857,7 @@ pub mod normal { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -923,7 +923,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -1521,7 +1521,7 @@ pub mod normal { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -1587,7 +1587,7 @@ pub mod normal { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/path_keyword.rs b/pilota-build/test_data/thrift/path_keyword.rs index 29bad54d..428a4c2b 100644 --- a/pilota-build/test_data/thrift/path_keyword.rs +++ b/pilota-build/test_data/thrift/path_keyword.rs @@ -81,13 +81,13 @@ pub mod path_keyword { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), )); }; @@ -161,7 +161,7 @@ pub mod path_keyword { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), ), ); }; @@ -169,7 +169,7 @@ pub mod path_keyword { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/pilota_name.rs b/pilota-build/test_data/thrift/pilota_name.rs index 959d44e1..37d14231 100644 --- a/pilota-build/test_data/thrift/pilota_name.rs +++ b/pilota-build/test_data/thrift/pilota_name.rs @@ -72,7 +72,7 @@ pub mod pilota_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), )); }; @@ -136,7 +136,7 @@ pub mod pilota_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), ), ); }; @@ -224,7 +224,7 @@ pub mod pilota_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -290,7 +290,7 @@ pub mod pilota_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -531,13 +531,13 @@ pub mod pilota_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field hello is required".to_string(), )); }; @@ -611,7 +611,7 @@ pub mod pilota_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), ), ); }; @@ -619,7 +619,7 @@ pub mod pilota_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field hello is required".to_string(), ), ); }; @@ -711,7 +711,7 @@ pub mod pilota_name { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -777,7 +777,7 @@ pub mod pilota_name { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/self_kw.rs b/pilota-build/test_data/thrift/self_kw.rs index 3759e832..efbd0169 100644 --- a/pilota-build/test_data/thrift/self_kw.rs +++ b/pilota-build/test_data/thrift/self_kw.rs @@ -181,19 +181,19 @@ pub mod self_kw { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field r#type is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field self_ is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field protocol is required".to_string(), )); }; @@ -275,7 +275,7 @@ pub mod self_kw { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field r#type is required".to_string(), ), ); }; @@ -283,7 +283,7 @@ pub mod self_kw { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field self_ is required".to_string(), ), ); }; @@ -291,7 +291,7 @@ pub mod self_kw { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field protocol is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/string.rs b/pilota-build/test_data/thrift/string.rs index e2b2feb9..6d95a028 100644 --- a/pilota-build/test_data/thrift/string.rs +++ b/pilota-build/test_data/thrift/string.rs @@ -81,13 +81,13 @@ pub mod string { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field faststr is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field string is required".to_string(), )); }; @@ -161,7 +161,7 @@ pub mod string { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field faststr is required".to_string(), ), ); }; @@ -169,7 +169,7 @@ pub mod string { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field string is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/thrift/wrapper_arc.rs b/pilota-build/test_data/thrift/wrapper_arc.rs index 00431b39..46e11d5a 100644 --- a/pilota-build/test_data/thrift/wrapper_arc.rs +++ b/pilota-build/test_data/thrift/wrapper_arc.rs @@ -333,7 +333,7 @@ pub mod wrapper_arc { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -399,7 +399,7 @@ pub mod wrapper_arc { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -733,19 +733,19 @@ pub mod wrapper_arc { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field name2 is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field name3 is required".to_string(), )); }; @@ -853,7 +853,7 @@ pub mod wrapper_arc { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field id is required".to_string(), ), ); }; @@ -861,7 +861,7 @@ pub mod wrapper_arc { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field name2 is required".to_string(), ), ); }; @@ -869,7 +869,7 @@ pub mod wrapper_arc { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field name3 is required".to_string(), ), ); }; @@ -989,7 +989,7 @@ pub mod wrapper_arc { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -1055,7 +1055,7 @@ pub mod wrapper_arc { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; diff --git a/pilota-build/test_data/unknown_fields.rs b/pilota-build/test_data/unknown_fields.rs index a2fa8866..38089f6c 100644 --- a/pilota-build/test_data/unknown_fields.rs +++ b/pilota-build/test_data/unknown_fields.rs @@ -451,13 +451,13 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), )); }; @@ -532,7 +532,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field bytes is required".to_string(), ), ); }; @@ -540,7 +540,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field vec is required".to_string(), ), ); }; @@ -656,7 +656,7 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field td is required".to_string(), )); }; @@ -725,7 +725,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field td is required".to_string(), ), ); }; @@ -1026,19 +1026,19 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field faststr is required".to_string(), )); }; let Some(var_2) = var_2 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field string is required".to_string(), )); }; let Some(var_3) = var_3 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field list is required".to_string(), )); }; @@ -1137,7 +1137,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field faststr is required".to_string(), ), ); }; @@ -1145,7 +1145,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_2 is required".to_string(), + "field string is required".to_string(), ), ); }; @@ -1153,7 +1153,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_3 is required".to_string(), + "field list is required".to_string(), ), ); }; @@ -1743,7 +1743,7 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field a is required".to_string(), )); }; @@ -1810,7 +1810,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field a is required".to_string(), ), ); }; @@ -2932,7 +2932,7 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -2998,7 +2998,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); }; @@ -3324,7 +3324,7 @@ pub mod unknown_fields { let Some(var_1) = var_1 else { return ::std::result::Result::Err(::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), )); }; @@ -3390,7 +3390,7 @@ pub mod unknown_fields { return ::std::result::Result::Err( ::pilota::thrift::new_protocol_exception( ::pilota::thrift::ProtocolExceptionKind::InvalidData, - "field var_1 is required".to_string(), + "field req is required".to_string(), ), ); };