diff options
| author | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-23 14:36:15 +0200 |
|---|---|---|
| committer | Arnaud Bailly <arnaud.bailly@iohk.io> | 2024-09-23 14:36:15 +0200 |
| commit | de98bfc28feebfe112a378017c73d0e20dfb2937 (patch) | |
| tree | b5bca14d2053ace6746ef9b9c82bed6c19b20254 /rust/src/main.rs | |
| parent | 66abe3871337139e839b693ea9e290eaa9a72516 (diff) | |
| download | lambda-nantes-de98bfc28feebfe112a378017c73d0e20dfb2937.tar.gz | |
Scaffolding of main, library, and tests
Diffstat (limited to 'rust/src/main.rs')
| -rw-r--r-- | rust/src/main.rs | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/rust/src/main.rs b/rust/src/main.rs index e18788e..b6cc9bf 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -1,23 +1,9 @@ -fn main() { - println!("Hello, world!"); -} - -#[derive(Debug, PartialEq)] -pub enum Value { - Num(i32), -} +use std::env::args; -pub fn interpret(arg: &str) -> Value { - Value::Num(1) -} +use lambda::run; -#[cfg(test)] -mod tests { - use crate::{interpret, Value::Num}; +mod lambda; - #[test] - fn it_works() { - let result = interpret("1"); - assert_eq!(Num(1), result); - } +fn main() { + run(&args().nth(1).unwrap()); } |
