Skip to content

Commit fe70417

Browse files
committed
Drop .ok().expect() pattern
1 parent b4da96b commit fe70417

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ mod tests {
146146
assert_eq!(req.content_length(), None);
147147
assert_eq!(req.headers().len(), 0);
148148
let mut s = String::new();
149-
req.body().read_to_string(&mut s).ok().expect("No body");
149+
req.body().read_to_string(&mut s).expect("No body");
150150
assert_eq!(s, "".to_string());
151151
}
152152

@@ -158,7 +158,7 @@ mod tests {
158158
assert_eq!(req.method(), Method::POST);
159159
assert_eq!(req.path(), "/articles");
160160
let mut s = String::new();
161-
req.body().read_to_string(&mut s).ok().expect("No body");
161+
req.body().read_to_string(&mut s).expect("No body");
162162
assert_eq!(s, "Hello world".to_string());
163163
assert_eq!(req.content_length(), Some(11));
164164
}

0 commit comments

Comments
 (0)