Skip to content

Perf: Use u32 instead of usize for Span #9

@Boshen

Description

@Boshen

u32 is enough for spans.

https://github.com/Boshen/oxc/blob/b6912513ba93ebb01ebc8882598951e26a79ea6c/crates/oxc_ast/src/node.rs#L11-L18

This is currently using usize because miette only accepts Range in its miette::Diagnostic macro.

https://github.com/Boshen/oxc/blob/b6912513ba93ebb01ebc8882598951e26a79ea6c/crates/oxc_diagnostics/src/lib.rs#L29-L33

There should be a workaround but I haven't investigated in detail yet.

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