Refactor Rust::Result into std::expected

The standard library already has support for this type as of C++23:
https://en.cppreference.com/w/cpp/header/expected

[This is also supported by all major compilers](https://en.cppreference.com/w/cpp/compiler_support#:~:text=Yes-,%3Cexpected%3E,-P0323R12%0AP2549R1)
This commit is contained in:
Wunkolo 2024-03-11 09:55:00 -07:00
parent 57193e7944
commit 3d0a0ccc0b
No known key found for this signature in database
21 changed files with 349 additions and 1621 deletions

View file

@ -16,8 +16,8 @@ class SystemSaveDataArchive : public ArchiveBase {
HorizonResult createFile(const FSPath& path, u64 size) override;
HorizonResult deleteFile(const FSPath& path) override;
Rust::Result<ArchiveBase*, HorizonResult> openArchive(const FSPath& path) override;
Rust::Result<DirectorySession, HorizonResult> openDirectory(const FSPath& path) override;
std::expected<ArchiveBase*, HorizonResult> openArchive(const FSPath& path) override;
std::expected<DirectorySession, HorizonResult> openDirectory(const FSPath& path) override;
FileDescriptor openFile(const FSPath& path, const FilePerms& perms) override;