From 9b178d48e0aa218bdb2fccaf46f2ce40c3148c7e Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 6 Apr 2016 01:09:45 -0400 Subject: 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. --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') 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 = 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); } } -- cgit v1.2.3