@@ -100,8 +100,7 @@ await read(async (items, token) =>
100100 }
101101
102102 static object ? RunSync ( MappedQuery < int > q , string terminal )
103- {
104- return terminal switch
103+ => terminal switch
105104 {
106105 "ToList" => q . ToList ( ) ,
107106 "ToArray" => q . ToArray ( ) ,
@@ -118,11 +117,9 @@ await read(async (items, token) =>
118117 "TakeFirst" => q . Take ( 2 ) . FirstOrDefault ( ) ,
119118 _ => throw new ArgumentOutOfRangeException ( nameof ( terminal ) ) ,
120119 } ;
121- }
122120
123121 static object ? RunSync ( MappedCommand < int > q , string terminal )
124- {
125- return terminal switch
122+ => terminal switch
126123 {
127124 "ToList" => q . ToList ( ) ,
128125 "ToArray" => q . ToArray ( ) ,
@@ -139,11 +136,9 @@ await read(async (items, token) =>
139136 "TakeFirst" => q . Take ( 2 ) . FirstOrDefault ( ) ,
140137 _ => throw new ArgumentOutOfRangeException ( nameof ( terminal ) ) ,
141138 } ;
142- }
143139
144140 static async Task < object ? > RunAsync ( MappedQuery < int > q , string terminal )
145- {
146- return terminal switch
141+ => terminal switch
147142 {
148143 "ToList" => await q . ToListAsync ( Ct ) ,
149144 "ToArray" => await q . ToArrayAsync ( Ct ) ,
@@ -159,7 +154,7 @@ await q.ReadAsync(
159154 {
160155 int sum = 0 ;
161156 await foreach ( int i in items . WithCancellation ( token ) ) sum += i ;
162- sum ;
157+ return sum ;
163158 } ,
164159 Ct ) ,
165160 "Skip" => await q . Skip ( 1 ) . ToListAsync ( Ct ) ,
@@ -168,11 +163,9 @@ await q.ReadAsync(
168163 "TakeFirst" => await q . Take ( 2 ) . FirstOrDefaultAsync ( Ct ) ,
169164 _ => throw new ArgumentOutOfRangeException ( nameof ( terminal ) ) ,
170165 } ;
171- }
172166
173167 static async Task < object ? > RunAsync ( MappedCommand < int > q , string terminal )
174- {
175- return terminal switch
168+ => terminal switch
176169 {
177170 "ToList" => await q . ToListAsync ( Ct ) ,
178171 "ToArray" => await q . ToArrayAsync ( Ct ) ,
@@ -188,7 +181,7 @@ await q.ReadAsync(
188181 {
189182 int sum = 0 ;
190183 await foreach ( int i in items . WithCancellation ( token ) ) sum += i ;
191- sum ;
184+ return sum ;
192185 } ,
193186 Ct ) ,
194187 "Skip" => await q . Skip ( 1 ) . ToListAsync ( Ct ) ,
@@ -197,7 +190,6 @@ await q.ReadAsync(
197190 "TakeFirst" => await q . Take ( 2 ) . FirstOrDefaultAsync ( Ct ) ,
198191 _ => throw new ArgumentOutOfRangeException ( nameof ( terminal ) ) ,
199192 } ;
200- }
201193
202194 // ---- an expressive command (IExecuteReader) ----
203195
0 commit comments