diff options
author | JSDurand <mmemmew@gmail.com> | 2023-02-03 10:52:35 +0800 |
---|---|---|
committer | JSDurand <mmemmew@gmail.com> | 2023-02-03 10:52:35 +0800 |
commit | 265ff8f87dc7392fdf701f811eb2bf54d7bc6678 (patch) | |
tree | 35538c8ac7524e0d9f2acff8be21b72994728bc4 /graph/src/lib.rs | |
parent | f28155105134b90fd86049c65478d307e0d8dbbc (diff) |
Finally produced the first correct forest
Finally the prototype parser has produced the first correct forest.
It is my first time to generate a correct forest, in fact, ever since
the beginning of this project.
Diffstat (limited to 'graph/src/lib.rs')
-rw-r--r-- | graph/src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/graph/src/lib.rs b/graph/src/lib.rs index 2a0c50d..87f39c0 100644 --- a/graph/src/lib.rs +++ b/graph/src/lib.rs @@ -129,8 +129,10 @@ pub trait Graph: Default { let result = format!("{preamble}{post}"); - if std::fs::metadata(filename).is_ok() { - std::fs::remove_file(filename)?; + let filename = format!("output/{filename}"); + + if std::fs::metadata(&filename).is_ok() { + std::fs::remove_file(&filename)?; } let mut file = std::fs::File::options() |