Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Rustを使うためにやったこと

 Rustを使うためにやったこと

The Rust Programming ( https://doc.rust-lang.org/book/ )
Rust by Example ( http://rustbyexample.com )
rust-lang-nursery/rustup ( https://github.com/rust-lang-nursery/rustup.rs )
hyperium/hyper ( https://github.com/hyperium/hyper )

Tomohide Takao

March 01, 2017
Tweet

More Decks by Tomohide Takao

Other Decks in Programming

Transcript

  1. ࣮ࡍʹϋϚͬͨίʔυྫ fn create_slack_message(items: &Vec<TodoistItem>, project_name_map: &HashMap<i64, String>, message_template: &MessageTemplate) ->

    String { let message = items.into_iter() .map(|item| { let project_name = project_name_map.get(&item.project_id).unwrap(); format!("{} {} `{}`", message_template.prefix_today_tasks.unwrap_or("default".to_string()) , item.content, project_name) }) .collect::<Vec<String>>() .join("\n"); }
  2. ࣮ࡍʹϋϚͬͨίʔυྫ fn create_slack_message(items: &Vec<TodoistItem>, project_name_map: &HashMap<i64, String>, message_template: &MessageTemplate) ->

    String { let message = items.into_iter() .map(|item| { let project_name = project_name_map.get(&item.project_id).unwrap(); format!("{} {} `{}`", message_template.prefix_today_tasks.unwrap_or("default".to_string()) , item.content, project_name) }) .collect::<Vec<String>>() .join("\n"); } ࢀরͰ౉ͨ͠ͷʹ ॴ༗ݖΛୣ͓͏ͱͯ͠͠·ͬͨʜ