Skip to content

Commit 728d5dc

Browse files
Apply suggestions from code review
Co-authored-by: Philippus Baalman <[email protected]>
1 parent f8b8af4 commit 728d5dc

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

_overviews/scala3-book/domain-modeling-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ Here’s an example of a “string utilities” object that contains a set of me
219219
object StringUtils:
220220
def truncate(s: String, length: Int): String = s.take(length)
221221
def containsWhitespace(s: String): Boolean = s.matches(".*\\s.*")
222-
def isNullOrEmpty(s: String): Boolean = s==null || s.trim.isEmpty
222+
def isNullOrEmpty(s: String): Boolean = s == null || s.trim.isEmpty
223223
```
224224

225225
We can use the object as follows:

_overviews/scala3-book/taste-objects.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For example, this `StringUtils` object contains a small collection of string-rel
2727

2828
```scala
2929
object StringUtils:
30-
def isNullOrEmpty(s: String): Boolean = s==null || s.trim.isEmpty
30+
def isNullOrEmpty(s: String): Boolean = s == null || s.trim.isEmpty
3131
def leftTrim(s: String): String = s.replaceAll("^\\s+", "")
3232
def rightTrim(s: String): String = s.replaceAll("\\s+$", "")
3333
```
@@ -92,4 +92,3 @@ NOTE: I don’t know if this is worth keeping, but I’m leaving it here as a co
9292
{% endcomment %}
9393

9494

95-

0 commit comments

Comments
 (0)