Skip to content

Commit 7c9ce6d

Browse files
committed
refactor
1 parent d85ef02 commit 7c9ce6d

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tl-parser/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use aws_lc_rs::digest;
2-
use std::io::Read;
32
use thiserror::Error;
43

54
#[derive(Error, Debug)]

tl-types/build.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1+
use anyhow::Context;
12
use std::path::PathBuf;
23
use std::{env, fs};
34

45
fn main() -> anyhow::Result<()> {
56
let out_dir = PathBuf::from(env::var("OUT_DIR")?);
67
let out_file = out_dir.join("schema.rs");
78

8-
let schema = fs::read_to_string("schema.tl")?;
9-
let schema = tl_parser::parse_schema(&schema)?;
9+
let schema = fs::read_to_string("schema.tl")
10+
.context("Failed to read schema.tl")?;
11+
let schema = tl_parser::parse_schema(&schema)
12+
.context("Failed to parse schema")?;
1013
let code = tl_generator::generate(&schema);
1114

12-
fs::write(out_file, code)?;
15+
fs::write(out_file, code)
16+
.context("Failed to write generated code")?;
1317

1418
Ok(())
1519
}

0 commit comments

Comments
 (0)