It is recommended to ignore Cargo.lock for libraries

See https://github.com/rust-lang/cargo/issues/315.
Fix [[lib]] to [lib] deprecation warning
Fix ToStrRadix and str.to_owned() deprecations

Sadly there doesn't seem to be a replacement for ToStrRadix on user
types at the moment. See: https://github.com/rust-lang/rust/issues/18301