You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Box/Box.swift
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
/// Wraps a type `T` in a reference type.
4
4
///
5
5
/// Typically this is used to work around limitations of value types (for example, the lack of codegen for recursive value types and type-parameterized enums with >1 case). It is also useful for sharing a single (presumably large) value without copying it.
6
-
publicfinalclassBox<T>:BoxType{
6
+
publicfinalclassBox<T>:BoxType,Printable{
7
7
/// Initializes a `Box` with the given value.
8
8
publicinit(_ value:T){
9
9
self.value = value
@@ -16,4 +16,11 @@ public final class Box<T>: BoxType {
0 commit comments