forked from rosa/hakurei
internal/rosa: read-only access to built-ins
This removes potential footguns caused by mutable builtins without requiring unnecessary clones. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -9,17 +9,17 @@ import (
|
||||
func TestLoad(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
for _, p := range rosa.Native().Collect() {
|
||||
for _, p := range rosa.Collect() {
|
||||
t.Run(p.String(), func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
rosa.Native().Std().MustLoad(p)
|
||||
rosa.MustLoad(p)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func BenchmarkAll(b *testing.B) {
|
||||
t := rosa.Native().Clone().Std()
|
||||
t := rosa.New().Std()
|
||||
|
||||
for b.Loop() {
|
||||
for _, p := range t.Collect() {
|
||||
|
||||
Reference in New Issue
Block a user