From 8a765ff317f7ea3ed1c1b9f3db7cb82aaed3064f Mon Sep 17 00:00:00 2001 From: "anthony.cicchetti" Date: Fri, 12 May 2017 14:01:47 -0400 Subject: [PATCH] Rust - WIP run-length-encoding --- rust/test/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/test/main.rs b/rust/test/main.rs index 05d893d..6475d3f 100644 --- a/rust/test/main.rs +++ b/rust/test/main.rs @@ -27,8 +27,8 @@ fn tupleize(inp_vec: Vec<&str>) -> Vec<(char, usize)>{ fn tup_convert(inp_tuple: Vec<(char, usize)>) -> Vec<&'static str>{ let mut converted: Vec<&'static str> = Vec::new(); for i in 0..inp_tuple.len() { - let string_converted_element: String = inp_tuple[i].1.to_string() + inp_tuple[i].0.to_string().as_str(); - let converted_element: &'static str = string_converted_element.as_str(); + let converted_element: &'static str = inp_tuple[i].1.to_string().as_str() + inp_tuple[i].0.to_string().as_str(); + // let converted_element: &'static str = string_converted_element; converted.push(converted_element); } return converted;