diff options
author | Nadrieril | 2019-12-22 19:43:32 +0000 |
---|---|---|
committer | Nadrieril | 2019-12-22 19:43:32 +0000 |
commit | 4322d1b0b7041eb160b1baadf9f6e63f0d4e9d9c (patch) | |
tree | 9ac1cc469e2cf7e21802b07214a6b44b981d000b /dhall/build.rs | |
parent | faccb680fbede2191e23161e7060be843bcc229e (diff) |
Update abnf dependency in the hopes of fixing a bug
Diffstat (limited to '')
-rw-r--r-- | dhall/build.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/dhall/build.rs b/dhall/build.rs index ec06ece..2a65f24 100644 --- a/dhall/build.rs +++ b/dhall/build.rs @@ -1,7 +1,7 @@ use std::env; use std::ffi::OsString; -use std::fs::File; -use std::io::{BufRead, BufReader, Read, Write}; +use std::fs::{read_to_string, File}; +use std::io::{BufRead, BufReader, Write}; use std::path::{Path, PathBuf}; use walkdir::WalkDir; @@ -383,10 +383,8 @@ fn convert_abnf_to_pest() -> std::io::Result<()> { println!("cargo:rerun-if-changed={}", abnf_path); println!("cargo:rerun-if-changed={}", visibility_path); - let mut file = File::open(abnf_path)?; - let mut data = Vec::new(); - file.read_to_end(&mut data)?; - data.push('\n' as u8); + let mut data = read_to_string(abnf_path)?; + data.push('\n'); let mut rules = abnf_to_pest::parse_abnf(&data)?; for line in BufReader::new(File::open(visibility_path)?).lines() { |