Skip to content

Commit 7242f1f

Browse files
committed
Fix doc comment describing when the remove function is called
1 parent ae66e1e commit 7242f1f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

ViewEnvironmentUI/Sources/ViewEnvironmentPropagating.swift

+4-2
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,8 @@ public typealias ViewEnvironmentUpdateObservation = (ViewEnvironment) -> Void
377377
public final class ViewEnvironmentUpdateObservationLifetime {
378378
/// Removes the observation.
379379
///
380-
/// This is called in `deinit`.
380+
/// The observation is removed when the lifetime is de-initialized if this function was not
381+
/// called before then.
381382
///
382383
public func remove() {
383384
guard let onRemove else {
@@ -482,7 +483,8 @@ public typealias ViewEnvironmentCustomization = (inout ViewEnvironment) -> Void
482483
public final class ViewEnvironmentCustomizationLifetime {
483484
/// Removes the observation.
484485
///
485-
/// This is called in `deinit`.
486+
/// The customization is removed when the lifetime is de-initialized if this function was not
487+
/// called before then.
486488
///
487489
public func remove() {
488490
onRemove()

0 commit comments

Comments
 (0)