fork of https://github.com/rustwasm/wasm-pack for the needs of NextGraph.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
7 years ago | |
---|---|---|
.. | ||
manifest.rs | 7 years ago | |
mod.rs | 7 years ago | |
readme.rs | 7 years ago |
readme.rs
use std::fs::File;
use std::io::Read;
use std::path::Path;
use failure::Error;
pub fn read_file(path: &Path) -> Result<String, Error> {
let mut file = File::open(path)?;
let mut contents = String::new();
file.read_to_string(&mut contents)?;
Ok(contents)
}