Skip to content

headers.keys() does not return an iterator #1247

@nabetti1720

Description

@nabetti1720

Currently, LLRT does not pass the following tests:

fetch/api/headers > should pass headers-basic.any.js tests
Error: [Check keys method] assert_equals: expected object "[object Iterator]" but got object "[object Object]"

This is probably because the return value of keys() is of type Vec<&str>.

pub fn keys(&self) -> Vec<&str>

I tried writing impl Iterator<Item = &str>, but an error occurs during build because there is no implementation of IntoJs. I believe this is because this is the way to write it when using an iterator within rust.

Is there any mechanism like the one below on the RquickJS side that I can use to solve the problem?
DelSkayn/rquickjs#320

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions