Skip to content

Commit 4ecad77

Browse files
committed
refactor: avoid unwrap in upgrades example
1 parent 773a140 commit 4ecad77

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/upgrades.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ async fn client_upgrade_request(addr: SocketAddr) -> Result<()> {
100100
.uri(format!("http://{}/", addr))
101101
.header(UPGRADE, "foobar")
102102
.body(Empty::<Bytes>::new())
103-
.unwrap();
103+
.expect("request should be valid");
104104

105105
let stream = TcpStream::connect(addr).await?;
106106
let io = TokioIo::new(stream);

0 commit comments

Comments
 (0)