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

Add github actions CI #10

Merged
merged 1 commit into from Jun 3, 2023
Merged

Add github actions CI #10

merged 1 commit into from Jun 3, 2023

Conversation

kchibisov
Copy link
Member

Also cleanup the code, use rustfmt, and migrate to once_cell.

Also cleanup the code, use rustfmt, and migrate to once_cell.
@kchibisov kchibisov merged commit aa3fda8 into master Jun 3, 2023
4 checks passed
|name| unsafe { XkbCommon::open(name) },
)
});
pub static XKBCOMMON_HANDLE: Lazy<&'static XkbCommon> = Lazy::new(|| {
Copy link
Member

Choose a reason for hiding this comment

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

I think it would be better to not expose the Lazy type, since OnceLock is now in std and making the once_cell crate a public dependency is fragile. I'd prefer an approach like this:

pub fn xkbcommon_handle() -> &'static XkbCommon {
    static XKBCOMMON_HANDLE: OnceCell<XkbCommon> = OnceCell::new();
    XKBCOMMON_HANDLE.get_or_init(|| /* ... */)
}

This would need elinorbgr/dlib#21 to be released first.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, we can open follow up for that, I wouldn't release this crate for a while.

The crate on its own is weird and its scope is sort of limited, as in for winit only.

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

Successfully merging this pull request may close these issues.

None yet

2 participants