1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
pub mod cut;
mod error;
pub mod frame;
pub mod reel;
mod utils;

use std::fs;
use std::io::Result;
use std::path::Path;

// Convenience in converting a Path to a String
pub fn file_to_string<P: AsRef<Path>>(path: P) -> Result<String> {
    // https://github.com/serde-rs/json/issues/160
    let json_string: String = fs::read_to_string(path)?;

    Ok(json_string)
}