FuelLabs/fuel-core

Avoid cloning of vectors in `HexString`

Open

#2 657 ouverte le 1 févr. 2025

Voir sur GitHub
 (2 commentaires) (0 réactions) (0 assignés)Rust (2 861 forks)batch import
good first issue

Métriques du dépôt

Stars
 (57 084 stars)
Métriques de merge PR
 (Merge moyen 8h 53m) (1 PR mergée en 30 j)

Description

The GraphQL server coverts bytes into the hex string to return it to the user. During this convert process, we take vector by value.

We have many cases where we clone vectors instead of passing it as a reference.

This issue is created to replace Vec<u8> with Cow<[u8]> or Cow<Vec<u8>> and allow usage of references.

Guide contributeur