From f628972c97b52a139f3d2ef31b0a4e690fafa601 Mon Sep 17 00:00:00 2001 From: andreakarasho Date: Sat, 1 Jun 2024 13:48:01 +0200 Subject: [PATCH] minor --- src/Query.cs | 2 +- src/Term.cs | 2 +- tests/Query.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Query.cs b/src/Query.cs index 12564a4..84e828f 100644 --- a/src/Query.cs +++ b/src/Query.cs @@ -178,7 +178,7 @@ internal Query(World world, ImmutableArray terms) { subQuery = World.GetQuery ( - Hashing.Calculate(or.Terms), + Hashing.Calculate(or.Terms.AsSpan()), [.. or.Terms], static (world, terms) => new Query(world, terms) ); diff --git a/src/Term.cs b/src/Term.cs index 057e3bb..98e68a3 100644 --- a/src/Term.cs +++ b/src/Term.cs @@ -20,7 +20,7 @@ public int CompareTo([NotNull] QueryTerm? other) public class ContainerQueryTerm(QueryTerm[] terms, TermOp op) : QueryTerm(0, op) { - public QueryTerm[] Terms { get; } = terms; + public ImmutableArray Terms { get; } = [.. terms]; } public enum TermOp : byte diff --git a/tests/Query.cs b/tests/Query.cs index 4bd2a3f..27cbc0f 100644 --- a/tests/Query.cs +++ b/tests/Query.cs @@ -375,7 +375,7 @@ public void Query_Adjacent_Or() Assert.Equal(ent2.ID, resEnt.ID); } - [Fact] + [Fact] public void Query_Nested_Or() { using var ctx = new Context();