Last active
October 21, 2015 10:56
-
-
Save enricostano/499597b9fe08d59a37b0 to your computer and use it in GitHub Desktop.
Pipa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::io::{self, BufRead}; | |
struct Item { | |
trigger: String, | |
value: String | |
} | |
impl Item { | |
fn new(trigger: String, value: String) -> Item { | |
Item { trigger: trigger, value: value } | |
} | |
} | |
fn trigger(index: &usize) -> String { | |
"o".to_string() | |
} | |
fn main() { | |
let stdin = io::stdin(); | |
let lines = stdin.lock().lines().enumerate().map(|t| Item::new(trigger(&t.0), t.1.unwrap())); | |
} |
Author
enricostano
commented
Oct 21, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment