johalun / sysctl-rs

A simplified Rust interface to the sysctl system call
MIT License
51 stars 23 forks source link

Fix doc examples. #29

Closed mordak closed 4 years ago

mordak commented 4 years ago

Remove unneeded extern lines while there. Also add convenience method to get CtlType from CtlValue.

Some of the doc examples no longer compiled, so were misleading examples. This diff removes all the 'ignore' annotations from the doc examples and makes them compile and pass on FreeBSD 12 and Ubuntu 20.

johalun commented 4 years ago

Thanks a bunch!