mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-29 07:03:29 +00:00
remove length check of fixed size
This commit is contained in:
committed by
Muki Kiboigo
parent
f68f184c68
commit
cf8f76b454
@@ -74,11 +74,6 @@ pub fn constructor(_init: ?HeadersInit, page: *Page) !Headers {
|
|||||||
switch (init) {
|
switch (init) {
|
||||||
.strings => |kvs| {
|
.strings => |kvs| {
|
||||||
for (kvs) |pair| {
|
for (kvs) |pair| {
|
||||||
// Can only have two string elements if in a pair.
|
|
||||||
if (pair.len != 2) {
|
|
||||||
return error.TypeError;
|
|
||||||
}
|
|
||||||
|
|
||||||
const key = try arena.dupe(u8, pair[0]);
|
const key = try arena.dupe(u8, pair[0]);
|
||||||
const value = try arena.dupe(u8, pair[1]);
|
const value = try arena.dupe(u8, pair[1]);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user