Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

fix: permissions are not copied #264

Merged
merged 1 commit into from
Jan 23, 2022
Merged

fix: permissions are not copied #264

merged 1 commit into from
Jan 23, 2022

Conversation

zamazan4ik
Copy link
Contributor

  • fix a small bug when permissions where not copied

Tested:

  • No

@zamazan4ik zamazan4ik self-assigned this Jan 23, 2022
@zamazan4ik
Copy link
Contributor Author

Fixes #252

@Plecra
Copy link
Member

Plecra commented Jan 23, 2022

I wonder if we could make this easier to catch in future reviews, or just need to remember. Would #[must_use] on FileOptions do it? (Sounds ugly for public api)

@zamazan4ik
Copy link
Contributor Author

Maybe this thread will be helpful for us: rust-lang/rust#48926

@zamazan4ik
Copy link
Contributor Author

Maybe another option is divide this struct into FileOptions and FileOptionsBuilder or smth like that

@Plecra
Copy link
Member

Plecra commented Jan 23, 2022

Ah, you're right, that issue does help. We ought to just add must_use to each of the methods on FileOptions. Then, it's alright for other functions to return an ignored FileOptions. Can you add that in this PR please?

@zamazan4ik
Copy link
Contributor Author

Sure, will do it

- fix a small bug when permissions where not copied
- add must_use attribute to the all FileOptions methods

Tested:
- No
@zamazan4ik
Copy link
Contributor Author

Done for all methods, except default.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants