Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove implicit string conversion from File::open #363

Merged
merged 3 commits into from
Feb 19, 2022

Conversation

nicholasbishop
Copy link
Member

As suggested in #73, avoid an implicit &str -> &CStr16 conversion in File::open, and just take a &CStr16 directly.

Also added a test for opening and reading a file so we can see this code works as expected. And to make logging easier in the test, add a Display impl for CString16.

@GabrielMajeri
Copy link
Collaborator

I like the new method API and the extra test, good work! Would be interesting to see how we can extend the FS tests in the future, in a similar way.

@GabrielMajeri GabrielMajeri merged commit 1c7bf77 into main Feb 19, 2022
@GabrielMajeri GabrielMajeri deleted the bishop-improve-open-2 branch February 19, 2022 06:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants