Getting the size of an AMQP Described value containing a list containing a Timestamp value panics with "unreachable!" in size_ser.rs:498:32.
Simple repro:
let timestamp = fe2o3_amqp_types::primitives::Timestamp::from_milliseconds(12345);
let mut list = fe2o3_amqp_types::primitives::List::new();
list.push(fe2o3_amqp_types::primitives::Value::Timestamp(timestamp));
let described = serde_amqp::described::Described {
descriptor: serde_amqp::descriptor::Descriptor::Code(0x73),
value: fe2o3_amqp_types::primitives::Value::List(list),
};
let value = fe2o3_amqp_types::primitives::Value::Described(Box::new(described));
let size_result = serde_amqp::size_ser::serialized_size(&value);
assert!(size_result.is_ok());
Note that the corresponding to_vec call works just fine:
let timestamp = fe2o3_amqp_types::primitives::Timestamp::from_milliseconds(12345);
let mut list = fe2o3_amqp_types::primitives::List::new();
list.push(fe2o3_amqp_types::primitives::Value::Timestamp(timestamp));
let described = serde_amqp::described::Described {
descriptor: serde_amqp::descriptor::Descriptor::Code(0x73),
value: fe2o3_amqp_types::primitives::Value::List(list),
};
let value = fe2o3_amqp_types::primitives::Value::Described(Box::new(described));
let vec_result = serde_amqp::ser::to_vec(&value);
assert!(vec_result.is_ok());
Getting the size of an AMQP Described value containing a list containing a Timestamp value panics with "unreachable!" in size_ser.rs:498:32.
Simple repro:
Note that the corresponding
to_vec
call works just fine: