refactor: use lib.rs in main.rs
this avoids duplicating unit tests, for instance https://stackoverflow.com/a/77038955
This commit is contained in:
parent
564f95aa32
commit
d6b9d7a407
1 changed files with 2 additions and 3 deletions
|
|
@ -4,8 +4,7 @@ use std::{
|
|||
process::ExitCode,
|
||||
};
|
||||
|
||||
mod formatting;
|
||||
mod nodes;
|
||||
use tylc as lib;
|
||||
|
||||
fn main() -> ExitCode {
|
||||
let input = match env::args().skip(1).rev().reduce(|x, a| a + &x) {
|
||||
|
|
@ -17,7 +16,7 @@ fn main() -> ExitCode {
|
|||
}
|
||||
};
|
||||
|
||||
match formatting::pretty_eval(input, 10) {
|
||||
match lib::formatting::pretty_eval(input, 10) {
|
||||
Ok(s) => println!("{s}"),
|
||||
|
||||
Err(e) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue