diff options
author | Dominick Allen <djallen@librehumanitas.org> | 2024-10-15 20:56:26 -0500 |
---|---|---|
committer | Dominick Allen <djallen@librehumanitas.org> | 2024-10-15 20:56:26 -0500 |
commit | f3ac764684c64fbdd2094853a80b23e570cd5d9c (patch) | |
tree | 3b7f64480a1247455d28e23b6bb5ff63303c9170 /source/libfud.cpp | |
parent | 71976e927cca43b970cb659c03fd6908c352ea3d (diff) |
Conver to using static constructors for string, sqlite, files.
Diffstat (limited to 'source/libfud.cpp')
-rw-r--r-- | source/libfud.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/libfud.cpp b/source/libfud.cpp index 8c962ba..cec544d 100644 --- a/source/libfud.cpp +++ b/source/libfud.cpp @@ -50,12 +50,12 @@ Result<String, FudStatus> getEnv(const char* name) return RetType::error(FudStatus::NotFound); } - String envVar{resultString}; - if (!envVar.valid()) { - return RetType::error(FudStatus::Failure); + auto envVarResult = String::makeFromCString(resultString); + if (envVarResult.isError()) { + return RetType::error(envVarResult); } - return RetType::okay(std::move(envVar)); + return RetType::okay(envVarResult); } } // namespace fud |