FuelLabs/fuel-core

Avoid cloning of vectors in `HexString`

Open

#2.657 geöffnet am 1. Feb. 2025

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (2.861 Forks)batch import
good first issue

Repository-Metriken

Stars
 (57.084 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8h 53m) (1 gemergte PR in 30 T)

Beschreibung

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.

Contributor Guide