Better type names in WithViewStore.debug. (#1973)

This commit is contained in:
Brandon Williams
2023-03-15 08:25:47 -07:00
committed by GitHub
parent 3b758ad7e4
commit d73a3494bf
3 changed files with 3 additions and 10 deletions

View File

@@ -163,13 +163,6 @@ public struct WithViewStore<ViewState, ViewAction, Content: View>: View {
?? "(No difference in state detected)"
}
?? "(Initial state)\n\(stateDump)"
func typeName(_ type: Any.Type) -> String {
var name = String(reflecting: type)
if let index = name.firstIndex(of: ".") {
name.removeSubrange(...index)
}
return name
}
print(
"""
\(prefix.isEmpty ? "" : "\(prefix): ")\