Skip to content

Commit

Permalink
Do not use $0
Browse files Browse the repository at this point in the history
... nicer.
  • Loading branch information
helje5 committed May 12, 2021
1 parent ce05306 commit 7ec0204
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ struct ContentView: View {
.tag(language)
}
}
Picker("Theme", selection: $theme) {
Picker("Theme", selection: $theme) { theme in
ForEach(CodeEditor.availableThemes) {
Text("\($0.rawValue.capitalized)")
.tag($0)
Text("\(theme.rawValue.capitalized)")
.tag(theme)
}
}
}
Expand All @@ -168,7 +168,7 @@ struct ContentView: View {

#if os(macOS)
CodeEditor(source: $source, language: language, theme: theme,
fontSize: .init(get: { CGFloat(fontSize) },
fontSize: .init(get: { CGFloat(fontSize) },
set: { fontSize = Int($0) }))
.frame(minWidth: 640, minHeight: 480)
#else
Expand Down

0 comments on commit 7ec0204

Please sign in to comment.