this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

list: suggest MatchN for non-concrete values in Contains doc

I tried to use Contains with a non-concrete value and
it did not work.
Roger suggested I could use MatchN.

Signed-off-by: Maximilian Gaß <m.gass@babiel.com>
Change-Id: Id359d8a745c19384ffd06d1d452d2dfd6a6a6964
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1235212
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

authored by

Maximilian Gaß and committed by
Daniel Martí
e21b59ad 0d9aef64

+2 -1
+2 -1
pkg/list/list.go
··· 312 312 } 313 313 314 314 // Contains reports whether v is contained in a. The value must be a 315 - // comparable value. 315 + // comparable and concrete value. 316 + // For non-concrete values, you can use [MatchN] with >0. 316 317 func Contains(a []cue.Value, v cue.Value) bool { 317 318 return slices.ContainsFunc(a, v.Equals) 318 319 }