Skip to content

[Enhancement]: Return error instead of panicking for missing bytes聽#26

Closed

Description

@Norbiros

The bytes crate currently panics when there aren't enough bytes available. It would be better to check the byte count beforehand and return a more user-friendly error instead of panicking.

Activity

  1. PonasKovas commented on Mar 1, 2025

    @PonasKovas

    Honestly I don't know why you're using the bytes crate at all if you're not doing anything zero copy (which is not practical with NBT, because the only data that would benefit in theory - strings and arrays have big problems (strings need to be converted to utf-8 and arrays may not be aligned).

  2. Vonr commented on Jul 8, 2026

    @Vonr
    Contributor

    this issue didnt get automatically closed from #48 getting merged btw

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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