Created
February 18, 2021 12:50
-
-
Save hfossli/fa774ae6f7959a6d9d0476233f8d6cd7 to your computer and use it in GitHub Desktop.
AutoID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct AutoID: Hashable { | |
private var parent: AnyHashable? | |
private var file: String | |
private var line: UInt | |
private var column: UInt | |
init(parent: AnyHashable? = nil, file: String = #file, line: UInt = #line, column: UInt = #column) { | |
self.parent = parent | |
self.file = file | |
self.line = line | |
self.column = column | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can be used like this
Will be pretty much the same as writing