Skip to content

Commit b2d6dfc

Browse files
committed
Update test_reads! macro
See rust-lang/rust#20563
1 parent cfe063d commit b2d6dfc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/http/common.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ pub fn read_http_version<R: Reader, F: FnMut(u8) -> bool>
167167

168168
// I couldn't think what to call it. Ah well. It's just trivial syntax sugar, anyway.
169169
macro_rules! test_reads {
170-
($func:ident $($value:expr => $expected:expr),*) => {{
170+
($func:ident, $($value:expr => $expected:expr),*) => {{
171171
$(
172172
assert_eq!(
173173
concat_idents!(read_, $func)(&mut MemReader::new($value.bytes().collect::<Vec<_>>()),
@@ -179,7 +179,7 @@ macro_rules! test_reads {
179179

180180
#[test]
181181
fn test_read_http_version() {
182-
test_reads!(http_version
182+
test_reads!(http_version,
183183
"HTTP/25.17\0" => Some((25, 17)),
184184
"http/1.0\0" => Some((1, 0)),
185185
"http 1.0\0" => None,
@@ -190,7 +190,7 @@ fn test_read_http_version() {
190190

191191
#[test]
192192
fn test_read_decimal() {
193-
test_reads!(decimal
193+
test_reads!(decimal,
194194
"0\0" => Some(0u),
195195
"0\0" => Some(0u8),
196196
"0\0" => Some(0u64),
@@ -217,7 +217,7 @@ fn test_read_decimal() {
217217

218218
#[test]
219219
fn test_read_hexadecimal() {
220-
test_reads!(hexadecimal
220+
test_reads!(hexadecimal,
221221
"0\0" => Some(0u),
222222
"0\0" => Some(0u8),
223223
"0\0" => Some(0u64),

0 commit comments

Comments
 (0)