Skip to content

Commit

Permalink
Remove String only logic
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif committed Jan 31, 2024
1 parent 902fdaf commit dd9fa55
Showing 1 changed file with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ extension Application {
}

do {
if
Value.self == String.self,
let stringValue = try? fileManager.string(path: path, filename: filename) as? Value
{
return stringValue
} else {
return try fileManager.in(path: path, filename: filename)
}
return try fileManager.in(path: path, filename: filename)
} catch {
log(
error: error,
Expand Down Expand Up @@ -76,11 +69,7 @@ extension Application {
)

do {
if let stringValue = newValue as? String {
try fileManager.out(string: stringValue, path: path, filename: filename)
} else {
try fileManager.out(newValue, path: path, filename: filename)
}
try fileManager.out(newValue, path: path, filename: filename)
} catch {
log(
error: error,
Expand Down

0 comments on commit dd9fa55

Please sign in to comment.