You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
rustfmt
This commit is contained in:
@ -264,8 +264,7 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_parse() {
|
fn test_parse() {
|
||||||
let mut buf =
|
let mut buf =
|
||||||
b"PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\nhello world"
|
b"PROXY TCP4 255.255.255.255 255.255.255.255 65535 65535\r\nhello world".as_slice();
|
||||||
.as_slice();
|
|
||||||
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
||||||
assert_eq!(buf, b"hello world");
|
assert_eq!(buf, b"hello world");
|
||||||
assert!(info.is_tcp());
|
assert!(info.is_tcp());
|
||||||
@ -274,7 +273,7 @@ mod tests {
|
|||||||
assert!(info.is_ipv4());
|
assert!(info.is_ipv4());
|
||||||
assert!(!info.is_ipv6());
|
assert!(!info.is_ipv6());
|
||||||
|
|
||||||
let mut buf =
|
let mut buf =
|
||||||
b"PROXY TCP6 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world"
|
b"PROXY TCP6 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world"
|
||||||
.as_slice();
|
.as_slice();
|
||||||
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
||||||
@ -294,7 +293,7 @@ mod tests {
|
|||||||
assert!(!info.is_ipv4());
|
assert!(!info.is_ipv4());
|
||||||
assert!(!info.is_ipv6());
|
assert!(!info.is_ipv6());
|
||||||
|
|
||||||
let mut buf =
|
let mut buf =
|
||||||
b"PROXY UNKNOWN ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world"
|
b"PROXY UNKNOWN ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 65535 65535\r\nhello world"
|
||||||
.as_slice();
|
.as_slice();
|
||||||
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
let info = ProxyProtocolV1Info::parse(&mut buf).unwrap();
|
||||||
|
Reference in New Issue
Block a user