Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
oconnor663
on Oct 13, 2017
|
parent
|
context
|
favorite
| on:
The Case for Writing a Kernel in Rust [pdf]
There are safe interfaces for this stuff too. The byteorder crate (not in the standard library, but widely used) has:
let i = NativeEndian::read_i64(...);
Or if you're literally parsing a string of digits:
let i: Option<i64> = digits.parse();
The `parse` method on strings is a particularly smooth piece of trait system magic.
Consider applying for YC's W25 batch! Applications are open till Nov 12.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: