Skip to content

file/ftw: use ftw::FileType and impl From<libc::mode_t> for FileType #300

New issue

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

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

Already on GitHub? # to your account

Closed
wants to merge 4 commits into from

Conversation

fox0
Copy link
Contributor

@fox0 fox0 commented Oct 5, 2024

No description provided.

ftw/src/lib.rs Outdated
struct FileTypeCopy {
mode: libc::mode_t,
}
let ft = unsafe { std::mem::transmute::<std::fs::FileType, FileTypeCopy>(value) };
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way to avoid this new unsafe?

@jgarzik
Copy link
Contributor

jgarzik commented Oct 10, 2024

I support these changes. However, ftw is under active development by Joseph, and I do not wish to create merge conflicts with his work.

It is ok in the future (T+3 months).

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants