diff options
Diffstat (limited to 'src/msg_util.rs')
-rw-r--r-- | src/msg_util.rs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/msg_util.rs b/src/msg_util.rs index 8634e2282..a78074ab1 100644 --- a/src/msg_util.rs +++ b/src/msg_util.rs @@ -26,7 +26,6 @@ pub fn serialize_key_value<'bldr>( &msg::KeyValueArgs { key: Some(key), value: Some(value), - ..Default::default() }, ) } @@ -71,7 +70,7 @@ pub fn serialize_fields<'bldr>( let kv = serialize_key_value(builder, key.as_ref(), val.to_str().unwrap()); fields.push(kv); } - return builder.create_vector(fields.as_ref()); + builder.create_vector(fields.as_ref()) } // Not to be confused with serialize_response which has nothing to do with HTTP. @@ -98,11 +97,11 @@ pub fn deserialize_request( ) -> Request<Body> { let mut r = Request::new(body); - assert!(header_msg.is_request() == true); + assert!(header_msg.is_request()); - let url = header_msg.url().unwrap(); - let uri = Uri::from_str(url).unwrap(); - *r.uri_mut() = uri; + let u = header_msg.url().unwrap(); + let u = Uri::from_str(u).unwrap(); + *r.uri_mut() = u; if let Some(method) = header_msg.method() { let method = Method::from_str(method).unwrap(); |