File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ final class BoundaryParser {
43
43
let match = [ . hyphen, . hyphen] + boundary
44
44
45
45
if
46
- ( buffer. count <= 1 && byte == . hyphen) ||
47
- ( buffer. count > 1 && buffer. count < match. count)
46
+ buffer. count < match. count && match [ buffer. count] == byte
48
47
{
49
48
state = . parsing( buffer: buffer + [ byte] , trailingHyphenCount: trailingHyphenCount)
50
49
break main
Original file line number Diff line number Diff line change @@ -163,6 +163,6 @@ class ParserTests: XCTestCase {
163
163
try parser. multipart. parse ( message)
164
164
165
165
XCTAssertEqual ( fields [ " file " ] ? . filename, " test.txt " )
166
- XCTAssertEqual ( " ---this is a test " , fields [ " file " ] ? . part. body. string )
166
+ XCTAssertEqual ( " ---this is a test " , fields [ " file " ] ? . part. body. makeString ( ) )
167
167
}
168
168
}
You can’t perform that action at this time.
0 commit comments