diff options
| author | Teddy Wing | 2016-04-06 01:09:45 -0400 |
|---|---|---|
| committer | Teddy Wing | 2016-04-06 01:11:41 -0400 |
| commit | 9b178d48e0aa218bdb2fccaf46f2ce40c3148c7e (patch) | |
| tree | 828dc76a7548203c035c1d14c5c955ad8e4caab2 /src | |
| parent | 0bdf385c57156b6e9d782fddb2dd6f2016cc0620 (diff) | |
| download | mutt-alias-auto-add-9b178d48e0aa218bdb2fccaf46f2ce40c3148c7e.tar.bz2 | |
Create a couple new functions to build our alias (stubs)
Stub out two new functions. The first, `handle_alias`, will manage the
alias appending process. The second, `build_alias`, will transform a
`From: ` string into a Mutt alias.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index a0cca2c..3e4a343 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,13 @@ use std::io::{self, BufRead}; +fn handle_alias(s: &str) { + let alias = build_alias(s); +} + +fn build_alias(s: &str) -> String { + String::from("String") +} + fn main() { let stdin = io::stdin(); let input: Vec<String> = stdin.lock().lines().map(|line| line.unwrap()).collect(); @@ -8,6 +16,7 @@ fn main() { if line.starts_with("From: ") { println!("!!!!!!!! {}", line); // run matcher function + handle_alias(line); } } |
