summaryrefslogtreecommitdiff
path: root/chain/src
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-07-21 11:41:00 +0800
committerJSDurand <mmemmew@gmail.com>2023-07-21 11:41:00 +0800
commit88052521eba5721809c472aab5bfae8a95e00956 (patch)
tree59257a644ac57966d2ab0d44c1aff8363fc11a3b /chain/src
parentf257f471f49bf13adf56868d8f8609309c7e100b (diff)
genins: Use relative file path for printing forests.
* chain/src/item/genins.rs: The absolute path is too long and unnecessary.
Diffstat (limited to 'chain/src')
-rw-r--r--chain/src/item/genins.rs8
1 files changed, 2 insertions, 6 deletions
diff --git a/chain/src/item/genins.rs b/chain/src/item/genins.rs
index 0de7198..bad0cfd 100644
--- a/chain/src/item/genins.rs
+++ b/chain/src/item/genins.rs
@@ -211,7 +211,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> {
// Whether or not to print detailed graphs of each step of
// operation for debugging purposes.
- let mut to_print = true;
+ let mut to_print = false;
if std::fs::metadata("output/").is_err() {
to_print = false;
@@ -235,11 +235,7 @@ impl DefaultForest<ForestLabel<GrammarLabel>> {
let num = {
let mut repetition = 0;
- while std::fs::metadata(format!(
- "/Users/durand/Desktop/Centre/A propos de programmes/Rust/rep/chain/output/pos {pos} - {repetition}.gv"
- ))
- .is_ok()
- {
+ while std::fs::metadata(format!("output/pos {pos} - {repetition}.gv")).is_ok() {
repetition += 1;
}