dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
21.43k stars 361 forks source link

Replace reference to a vector with a u8 slice to avoid unnecessary indirection #1532

Closed lavafroth closed 6 months ago

lavafroth commented 10 months ago

When previewing syntax themes, the optionally reference to standard input data (vector of u8) is mapped to an optional u8 slice since it is passed to the respective function as an immutable argument unconditionally.

This also avoids unnecessary indirection because a reference to a Vec is a reference to a reference.