summaryrefslogtreecommitdiff
path: root/dhall
diff options
context:
space:
mode:
authorNadrieril2019-12-22 19:43:32 +0000
committerNadrieril2019-12-22 19:43:32 +0000
commit4322d1b0b7041eb160b1baadf9f6e63f0d4e9d9c (patch)
tree9ac1cc469e2cf7e21802b07214a6b44b981d000b /dhall
parentfaccb680fbede2191e23161e7060be843bcc229e (diff)
Update abnf dependency in the hopes of fixing a bug
Diffstat (limited to 'dhall')
-rw-r--r--dhall/Cargo.toml2
-rw-r--r--dhall/build.rs10
2 files changed, 5 insertions, 7 deletions
diff --git a/dhall/Cargo.toml b/dhall/Cargo.toml
index 34cf444..8674f44 100644
--- a/dhall/Cargo.toml
+++ b/dhall/Cargo.toml
@@ -26,7 +26,7 @@ pretty_assertions = "0.6.1"
[build-dependencies]
walkdir = "2"
-abnf_to_pest = { version = "0.1.2", path = "../abnf_to_pest" }
+abnf_to_pest = { version = "0.2.0", path = "../abnf_to_pest" }
pest_generator = "2.1"
quote = "1.0"
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() {