-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use FileOpenFlags instead of OpenOptions in DynFilesystem
Previously, DynFilesystem used OpenOptions for opening files in a custom mode. This has two drawbacks: OpenOptions are constructed using a callback leading to a rather complex method signature. And OpenOption depends on the Filesystem type, making it impossible to move DynFilesystem into a separate core crate without also moving Filesystem. This patch makes the FileOpenFlags struct public, changes its backing type to i32 to avoid unnecessary conversions and changes the DynFilesystem trait to accept FileOpenFlags instead of an OpenOptionsCallback. The affected methods are renamed from *with_options* to *with_flags*.
- Loading branch information
1 parent
e6435d2
commit 63a1265
Showing
3 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters