Update build.rs

This commit is contained in:
Sunli 2022-08-12 12:48:01 +08:00
parent da7c6ba652
commit a5ad2cd03c
2 changed files with 8 additions and 1 deletions

View File

@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
# [4.0.8] 2022-08-12
- Add tracing to dataloader methods when the tracing feature is enabled. [#996](https://github.com/async-graphql/async-graphql/pull/996)
# [4.0.7] 2022-08-09
- Limit parser recursion depth to `64`.

View File

@ -24,6 +24,9 @@ struct GraphQLParser;
let tokens = pest_generator::derive_parser(input, false);
let new = tokens.to_string();
let code = format!("{}\n{}", PREAMBLE, &new);
fs::write("./src/parse/generated.rs", code).unwrap();
let current_code = fs::read_to_string("./src/parse/generated.rs").unwrap();
if current_code != code {
fs::write("./src/parse/generated.rs", code).unwrap();
}
Ok(())
}