Skip to content

Commit 89b89e7

Browse files
style(Common): Add explicit type annotations in transport tests
Add explicit type parameters to `.parse::<TransportType>()` calls and `Vec::<u8>::new()` in test assertions. These annotations improve compiler type inference clarity and make the expected types explicit in the Transport and UnifiedRequest test modules.
1 parent 0d6c5cd commit 89b89e7

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Source/Transport/Common/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ mod tests {
191191

192192
#[test]
193193
fn TestTransportTypeFromString() {
194-
assert_eq!("grpc".parse().unwrap(), TransportType::Grpc);
195-
assert_eq!("ipc".parse().unwrap(), TransportType::Ipc);
196-
assert_eq!("wasm".parse().unwrap(), TransportType::Wasm);
194+
assert_eq!("grpc".parse::<TransportType>().unwrap(), TransportType::Grpc);
195+
assert_eq!("ipc".parse::<TransportType>().unwrap(), TransportType::Ipc);
196+
assert_eq!("wasm".parse::<TransportType>().unwrap(), TransportType::Wasm);
197197
assert!("invalid".parse::<TransportType>().is_err());
198198
}
199199

Source/Transport/UnifiedRequest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ mod tests {
130130
let Request = UnifiedRequest::New("test.method");
131131
assert!(!Request.Method.is_empty());
132132
assert!(Request.CorrelationIdentifier.is_some());
133-
assert_eq!(Request.Payload, Vec::new());
133+
assert_eq!(Request.Payload, Vec::<u8>::new());
134134
assert!(Request.Metadata.is_empty());
135135
assert!(Request.TransportHint.is_none());
136136
}

0 commit comments

Comments
 (0)