Skip to content

Refactor windows::fs::FileAttr #31675

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

Merged
merged 1 commit into from
Feb 16, 2016
Merged

Refactor windows::fs::FileAttr #31675

merged 1 commit into from
Feb 16, 2016

Conversation

pitdicker
Copy link
Contributor

Because we no longer use GetFileAttributesExW FileAttr is never created directly from WIN32_FILE_ATTRIBUTE_DATA anymore. So we should no longer store FileAttr's attributes in that c struct.

r? @alexcrichton
Is this what you had in mind?

Because we no longer use `GetFileAttributesExW` FileAttr is never created
directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore.
So we should no longer store FileAttr's attributes in that c struct.
@pitdicker
Copy link
Contributor Author

An other question. This pr and my previous ones make some functions and constants in windows::c unnecessary. Should I remove them? Why does this module not warn on dead code anyway?

@alexcrichton
Copy link
Member

@bors: r+ 44e31b9

Ah yeah I was hoping we could just change the contained struct to something else but this is also fine (as it doesn't look like there's a shared struct to use like there is on Unix). We can always add more fields over time!

You can also feel free to clean out windows::c if you like, I think I explicitly added #![allow(dead_code)] as we often start using old APIs over time and it assuages re-adding them, but if you want to delete that attribute and delete all the dead code that's also fine by me!

@bors
Copy link
Collaborator

bors commented Feb 16, 2016

⌛ Testing commit 44e31b9 with merge 4f86b8e...

bors added a commit that referenced this pull request Feb 16, 2016
Because we no longer use `GetFileAttributesExW` FileAttr is never created directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore. So we should no longer store FileAttr's attributes in that c struct.

r? @alexcrichton
Is this what you had in mind?
@bors bors merged commit 44e31b9 into rust-lang:master Feb 16, 2016
@pitdicker pitdicker deleted the fs_metadata branch February 28, 2016 07:59
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