Commit Graph

2 Commits

Author SHA1 Message Date
Floris Bruynooghe
e2f1ea1444 Add .strdup() method to Option<AsRef<str>>
We already have a .strdup() method on AsRef<str>, this adds this
method also to an option of this.  In case the option is None a NULL
pointer is returned.

This is done by using a new trait, as the type system otherwise
considers such an implementation conflicting with the existing one.
2020-02-16 23:15:53 +01:00
dignifiedquire
db88212a64 refactor: unsafe, CStr and libc moved out 2019-12-03 12:25:22 +01:00