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

Always closing (and more) #123

Merged

Conversation

peterkrull
Copy link
Contributor

Answering my own issue #122 with this one.

When calling VolumeManager::close_file(..) one would expect the file index to actually be removed from the volume manager, even if flushing the data to the card fails. This is currently not the case due to any errors during flushing short-circuiting the error. This PR addresses that.

I have also taken some the liberties in turning some for-loop searches into iterators, and removed panicking behavior from the impl Drops on volumes, directories and files.

src/volume_mgr.rs Outdated Show resolved Hide resolved
src/filesystem/files.rs Outdated Show resolved Hide resolved
src/volume_mgr.rs Outdated Show resolved Hide resolved
src/filesystem/files.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@thejpster
Copy link
Member

Sorry, spotted a few more things on this pass. And would you mind squashing the branch - we've got some commits that are now redundant.

@thejpster
Copy link
Member

Looks good to me - thank you!

@thejpster thejpster added this pull request to the merge queue Mar 30, 2024
Merged via the queue into rust-embedded-community:develop with commit 710bd34 Mar 30, 2024
4 checks passed
@peterkrull peterkrull deleted the always-closing branch March 30, 2024 12:33
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.

3 participants