FuelLabs/fuel-core

Avoid cloning of vectors in `HexString`

Aberta

#2.657 aberto em 1 de fev. de 2025

 (2 comentários) (0 reação) (0 responsável)Rust (2.861 forks)batch import
good first issue

Métricas do repositório

Stars
 (57.084 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

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.

Guia do colaborador