smithay icon indicating copy to clipboard operation
smithay copied to clipboard

Use CStr literals everywhere possible

Open linkmauve opened this issue 2 months ago • 1 comments

This addition to the 2021 edition makes it possible to generate a &CStr at compile-time, with no need for unwrap()/expect() or unsafe, making it much more ergonomic to pass to C APIs.

I’ve also modified the SealedString constructors to take a &CStr instead of a CString since it only needs to use it, not keep ownership of it.

This requires to bump the MSRV to 1.77 so I just did.

linkmauve avatar Jun 30 '24 17:06 linkmauve