Skip to content

Commit f55a2f9

Browse files
author
Hoang Pham
committed
Remove unuse argument
1 parent 8793e71 commit f55a2f9

6 files changed

Lines changed: 0 additions & 59 deletions

File tree

Sources/SwiftUIQuery/Core/InfiniteQueryTypes.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@ public struct InfiniteQueryOptions<
5757
public let refetchTriggers: RefetchTriggers
5858
/// Specific behavior for view appear events
5959
public let refetchOnAppear: RefetchOnAppear
60-
/// Whether to use structural sharing for performance
61-
public let structuralSharing: Bool
6260
/// Arbitrary metadata for this query
6361
public let meta: QueryMeta?
6462
/// Whether this query is enabled (will fetch automatically)
@@ -91,7 +89,6 @@ public struct InfiniteQueryOptions<
9189
gcTime: TimeInterval = defaultGcTime,
9290
refetchTriggers: RefetchTriggers = .default,
9391
refetchOnAppear: RefetchOnAppear = .always,
94-
structuralSharing: Bool = true,
9592
meta: QueryMeta? = nil,
9693
enabled: Bool = true
9794
) {
@@ -107,7 +104,6 @@ public struct InfiniteQueryOptions<
107104
self.gcTime = gcTime
108105
self.refetchTriggers = refetchTriggers
109106
self.refetchOnAppear = refetchOnAppear
110-
self.structuralSharing = structuralSharing
111107
self.meta = meta
112108
self.enabled = enabled
113109
}

Sources/SwiftUIQuery/Core/QueryOptions.swift

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public struct QueryOptions<TData: Sendable, TKey: QueryKey>: Sendable, Equatable
3838
public let initialData: TData?
3939
/// Function to provide initial data
4040
public let initialDataFunction: InitialDataFunction<TData>?
41-
/// Whether to use structural sharing for performance
42-
public let structuralSharing: Bool
4341
/// Arbitrary metadata for this query
4442
public let meta: QueryMeta?
4543
/// Whether this query is enabled (will fetch automatically)
@@ -65,7 +63,6 @@ public struct QueryOptions<TData: Sendable, TKey: QueryKey>: Sendable, Equatable
6563
refetchOnAppear: RefetchOnAppear = .always,
6664
initialData: TData? = nil,
6765
initialDataFunction: InitialDataFunction<TData>? = nil,
68-
structuralSharing: Bool = true,
6966
meta: QueryMeta? = nil,
7067
enabled: Bool = true
7168
) {
@@ -79,7 +76,6 @@ public struct QueryOptions<TData: Sendable, TKey: QueryKey>: Sendable, Equatable
7976
self.refetchOnAppear = refetchOnAppear
8077
self.initialData = initialData
8178
self.initialDataFunction = initialDataFunction
82-
self.structuralSharing = structuralSharing
8379
self.meta = meta
8480
self.enabled = enabled
8581
}
@@ -100,7 +96,6 @@ extension QueryOptions {
10096
refetchOnAppear: RefetchOnAppear = .always,
10197
initialData: TData? = nil,
10298
initialDataFunction: InitialDataFunction<TData>? = nil,
103-
structuralSharing: Bool = true,
10499
meta: QueryMeta? = nil,
105100
enabled: Bool = true
106101
) where TKey == KeyTuple2<K1, K2> {
@@ -115,7 +110,6 @@ extension QueryOptions {
115110
refetchOnAppear: refetchOnAppear,
116111
initialData: initialData,
117112
initialDataFunction: initialDataFunction,
118-
structuralSharing: structuralSharing,
119113
meta: meta,
120114
enabled: enabled
121115
)
@@ -133,7 +127,6 @@ extension QueryOptions {
133127
refetchOnAppear: RefetchOnAppear = .always,
134128
initialData: TData? = nil,
135129
initialDataFunction: InitialDataFunction<TData>? = nil,
136-
structuralSharing: Bool = true,
137130
meta: QueryMeta? = nil,
138131
enabled: Bool = true
139132
) where TKey == KeyTuple3<K1, K2, K3> {
@@ -148,7 +141,6 @@ extension QueryOptions {
148141
refetchOnAppear: refetchOnAppear,
149142
initialData: initialData,
150143
initialDataFunction: initialDataFunction,
151-
structuralSharing: structuralSharing,
152144
meta: meta,
153145
enabled: enabled
154146
)
@@ -166,7 +158,6 @@ extension QueryOptions {
166158
refetchOnAppear: RefetchOnAppear = .always,
167159
initialData: TData? = nil,
168160
initialDataFunction: InitialDataFunction<TData>? = nil,
169-
structuralSharing: Bool = true,
170161
meta: QueryMeta? = nil,
171162
enabled: Bool = true
172163
) where TKey == KeyTuple4<K1, K2, K3, K4> {
@@ -181,7 +172,6 @@ extension QueryOptions {
181172
refetchOnAppear: refetchOnAppear,
182173
initialData: initialData,
183174
initialDataFunction: initialDataFunction,
184-
structuralSharing: structuralSharing,
185175
meta: meta,
186176
enabled: enabled
187177
)
@@ -205,7 +195,6 @@ extension QueryOptions {
205195
refetchOnAppear: RefetchOnAppear = .always,
206196
initialData: TData? = nil,
207197
initialDataFunction: InitialDataFunction<TData>? = nil,
208-
structuralSharing: Bool = true,
209198
meta: QueryMeta? = nil,
210199
enabled: Bool = true
211200
) where TKey == KeyTuple5<K1, K2, K3, K4, K5> {
@@ -220,7 +209,6 @@ extension QueryOptions {
220209
refetchOnAppear: refetchOnAppear,
221210
initialData: initialData,
222211
initialDataFunction: initialDataFunction,
223-
structuralSharing: structuralSharing,
224212
meta: meta,
225213
enabled: enabled
226214
)

Sources/SwiftUIQuery/QueryClient.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ public final class QueryClient {
278278
refetchOnAppear: .always,
279279
initialData: nil,
280280
initialDataFunction: nil,
281-
structuralSharing: true,
282281
meta: nil,
283282
enabled: true
284283
)
@@ -484,7 +483,6 @@ public final class QueryClient {
484483
refetchOnAppear: options.refetchOnAppear,
485484
initialData: options.initialData,
486485
initialDataFunction: options.initialDataFunction,
487-
structuralSharing: options.structuralSharing,
488486
meta: options.meta,
489487
enabled: options.enabled
490488
)
@@ -509,7 +507,6 @@ public final class QueryClient {
509507
gcTime: defaults.gcTime ?? options.gcTime,
510508
refetchTriggers: defaults.refetchTriggers ?? options.refetchTriggers,
511509
refetchOnAppear: options.refetchOnAppear,
512-
structuralSharing: options.structuralSharing,
513510
meta: options.meta,
514511
enabled: options.enabled
515512
)

Sources/SwiftUIQuery/UseInfiniteQuery.swift

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ public struct UseInfiniteQuery<
190190
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
191191
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
192192
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
193-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
194193
/// - meta: Arbitrary metadata for this query
195194
/// - enabled: Whether the query should execute automatically (default: true)
196195
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -208,7 +207,6 @@ public struct UseInfiniteQuery<
208207
gcTime: TimeInterval = defaultGcTime,
209208
refetchTriggers: RefetchTriggers = .default,
210209
refetchOnAppear: RefetchOnAppear = .ifStale,
211-
structuralSharing: Bool = true,
212210
meta: QueryMeta? = nil,
213211
enabled: Bool = true,
214212
queryClient: QueryClient? = nil,
@@ -227,7 +225,6 @@ public struct UseInfiniteQuery<
227225
gcTime: gcTime,
228226
refetchTriggers: refetchTriggers,
229227
refetchOnAppear: refetchOnAppear,
230-
structuralSharing: structuralSharing,
231228
meta: meta,
232229
enabled: enabled
233230
)
@@ -319,7 +316,6 @@ extension UseInfiniteQuery {
319316
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
320317
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
321318
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
322-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
323319
/// - meta: Arbitrary metadata for this query
324320
/// - enabled: Whether the query should execute automatically (default: true)
325321
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -337,7 +333,6 @@ extension UseInfiniteQuery {
337333
gcTime: TimeInterval = defaultGcTime,
338334
refetchTriggers: RefetchTriggers = .default,
339335
refetchOnAppear: RefetchOnAppear = .ifStale,
340-
structuralSharing: Bool = true,
341336
meta: QueryMeta? = nil,
342337
enabled: Bool = true,
343338
queryClient: QueryClient? = nil,
@@ -356,7 +351,6 @@ extension UseInfiniteQuery {
356351
gcTime: gcTime,
357352
refetchTriggers: refetchTriggers,
358353
refetchOnAppear: refetchOnAppear,
359-
structuralSharing: structuralSharing,
360354
meta: meta,
361355
enabled: enabled
362356
)
@@ -382,7 +376,6 @@ extension UseInfiniteQuery {
382376
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
383377
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
384378
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
385-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
386379
/// - meta: Arbitrary metadata for this query
387380
/// - enabled: Whether the query should execute automatically (default: true)
388381
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -400,7 +393,6 @@ extension UseInfiniteQuery {
400393
gcTime: TimeInterval = defaultGcTime,
401394
refetchTriggers: RefetchTriggers = .default,
402395
refetchOnAppear: RefetchOnAppear = .ifStale,
403-
structuralSharing: Bool = true,
404396
meta: QueryMeta? = nil,
405397
enabled: Bool = true,
406398
queryClient: QueryClient? = nil,
@@ -419,7 +411,6 @@ extension UseInfiniteQuery {
419411
gcTime: gcTime,
420412
refetchTriggers: refetchTriggers,
421413
refetchOnAppear: refetchOnAppear,
422-
structuralSharing: structuralSharing,
423414
meta: meta,
424415
enabled: enabled
425416
)
@@ -445,7 +436,6 @@ extension UseInfiniteQuery {
445436
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
446437
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
447438
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
448-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
449439
/// - meta: Arbitrary metadata for this query
450440
/// - enabled: Whether the query should execute automatically (default: true)
451441
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -463,7 +453,6 @@ extension UseInfiniteQuery {
463453
gcTime: TimeInterval = defaultGcTime,
464454
refetchTriggers: RefetchTriggers = .default,
465455
refetchOnAppear: RefetchOnAppear = .ifStale,
466-
structuralSharing: Bool = true,
467456
meta: QueryMeta? = nil,
468457
enabled: Bool = true,
469458
queryClient: QueryClient? = nil,
@@ -482,7 +471,6 @@ extension UseInfiniteQuery {
482471
gcTime: gcTime,
483472
refetchTriggers: refetchTriggers,
484473
refetchOnAppear: refetchOnAppear,
485-
structuralSharing: structuralSharing,
486474
meta: meta,
487475
enabled: enabled
488476
)
@@ -508,7 +496,6 @@ extension UseInfiniteQuery {
508496
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
509497
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
510498
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
511-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
512499
/// - meta: Arbitrary metadata for this query
513500
/// - enabled: Whether the query should execute automatically (default: true)
514501
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -532,7 +519,6 @@ extension UseInfiniteQuery {
532519
gcTime: TimeInterval = defaultGcTime,
533520
refetchTriggers: RefetchTriggers = .default,
534521
refetchOnAppear: RefetchOnAppear = .ifStale,
535-
structuralSharing: Bool = true,
536522
meta: QueryMeta? = nil,
537523
enabled: Bool = true,
538524
queryClient: QueryClient? = nil,
@@ -551,7 +537,6 @@ extension UseInfiniteQuery {
551537
gcTime: gcTime,
552538
refetchTriggers: refetchTriggers,
553539
refetchOnAppear: refetchOnAppear,
554-
structuralSharing: structuralSharing,
555540
meta: meta,
556541
enabled: enabled
557542
)
@@ -577,7 +562,6 @@ extension UseInfiniteQuery {
577562
/// - gcTime: Time before unused data is garbage collected (default: 5 minutes)
578563
/// - refetchTriggers: Configuration for automatic refetching triggers (default: .default)
579564
/// - refetchOnAppear: When to refetch data on view appear (default: .ifStale)
580-
/// - structuralSharing: Whether to use structural sharing for performance (default: true)
581565
/// - meta: Arbitrary metadata for this query
582566
/// - enabled: Whether the query should execute automatically (default: true)
583567
/// - queryClient: Optional query client (uses shared instance if nil)
@@ -602,7 +586,6 @@ extension UseInfiniteQuery {
602586
gcTime: TimeInterval = defaultGcTime,
603587
refetchTriggers: RefetchTriggers = .default,
604588
refetchOnAppear: RefetchOnAppear = .ifStale,
605-
structuralSharing: Bool = true,
606589
meta: QueryMeta? = nil,
607590
enabled: Bool = true,
608591
queryClient: QueryClient? = nil,
@@ -621,7 +604,6 @@ extension UseInfiniteQuery {
621604
gcTime: gcTime,
622605
refetchTriggers: refetchTriggers,
623606
refetchOnAppear: refetchOnAppear,
624-
structuralSharing: structuralSharing,
625607
meta: meta,
626608
enabled: enabled
627609
)

0 commit comments

Comments
 (0)