News for hackers. Stuff that matters.
Re:Fast Rust Builds by jatone on Sunday September 05, 2021 @03:36PM (#28427101)
bytes, err := ioutil.ReadAll("path.txt")

is the golang equivalent.

Re:Fast Rust Builds by steveklabnik on Sunday September 05, 2021 @03:52PM (#28427212)
To be clear you can write

    let bytes = std::fs::read(“path.txt”)?;
If you’re trying to actually do this in real code. The example is how you’d write this function yourself, but if you’re just trying to Get It Done, it’s significantly easier than the example.