Skip to content

Commit

Permalink
refactor: remove unnecessary return keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
gtn1024 committed Sep 27, 2024
1 parent 461b807 commit ea084bb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/cjdotenv.cj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func filenamesOrDefault(filenames: Array<String>) {
if (filenames.isEmpty()) {
return [".env"]
}
return filenames
filenames
}

/**
Expand Down Expand Up @@ -51,5 +51,5 @@ func getFileData(filename: String) {
}

let data = String.fromUtf8(bytes)
return data
data
}
6 changes: 3 additions & 3 deletions src/parser.cj
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func getStatementStart(src: String): String {
return ""
}

return getStatementStart(rem[pos..])
getStatementStart(rem[pos..])
}

func extractKey(src: String) {
Expand Down Expand Up @@ -103,7 +103,7 @@ func extractKey(src: String) {

key = key.trimEnd(isSpace)
let rem = s[offset..].trimStart(isSpace)
return (key, rem)
(key, rem)
}

func extractValue(src: String, vars: HashMap<String, String>) {
Expand Down Expand Up @@ -185,7 +185,7 @@ func indexOfNonSpaceChar(src: String) {
}
}

return -1
-1
}

func isSpace(c: Rune): Bool {
Expand Down
3 changes: 2 additions & 1 deletion src/util.cj
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ func indexFunc(s: String, predicate: (Rune) -> Bool) {
return i
}
}
return -1

-1
}

0 comments on commit ea084bb

Please sign in to comment.