diff --git a/rust/test/Cargo.lock b/rust/test/Cargo.lock new file mode 100644 index 0000000..7782c22 --- /dev/null +++ b/rust/test/Cargo.lock @@ -0,0 +1,4 @@ +[root] +name = "testing_crate" +version = "0.1.0" + diff --git a/rust/test/Cargo.toml b/rust/test/Cargo.toml new file mode 100644 index 0000000..39b741c --- /dev/null +++ b/rust/test/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "testing_crate" +version = "0.1.0" +authors = ["anthony.cicchetti "] + +[dependencies] + +[[bin]] +name = "testing_crate" +path = "main.rs" diff --git a/rust/test/main.exe b/rust/test/main.exe index c533b4d..42728e7 100644 Binary files a/rust/test/main.exe and b/rust/test/main.exe differ diff --git a/rust/test/main.pdb b/rust/test/main.pdb index 256e5b8..bb2ee5c 100644 Binary files a/rust/test/main.pdb and b/rust/test/main.pdb differ diff --git a/rust/test/main.rs b/rust/test/main.rs index 5afed85..05d893d 100644 --- a/rust/test/main.rs +++ b/rust/test/main.rs @@ -26,8 +26,9 @@ fn tupleize(inp_vec: Vec<&str>) -> Vec<(char, usize)>{ // Converts tuple into a vector of strings fn tup_convert(inp_tuple: Vec<(char, usize)>) -> Vec<&'static str>{ let mut converted: Vec<&'static str> = Vec::new(); - for i in inp_tuple.len().iter() { - let converted_element: &'static str = inp_tuple[i].1.as_str() + inp_tuple[i].0.as_str(); + 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(); converted.push(converted_element); } return converted; diff --git a/rust/test/target/debug/.cargo-lock b/rust/test/target/debug/.cargo-lock new file mode 100644 index 0000000..e69de29 diff --git a/rust/test/target/debug/deps/testing_crate-b92142a9c79df8a4.d b/rust/test/target/debug/deps/testing_crate-b92142a9c79df8a4.d new file mode 100644 index 0000000..6a72bbe --- /dev/null +++ b/rust/test/target/debug/deps/testing_crate-b92142a9c79df8a4.d @@ -0,0 +1,5 @@ +C:\Users\ACicchetti\exercism\rust\test\target\debug\deps\testing_crate-b92142a9c79df8a4.exe: main.rs + +C:\Users\ACicchetti\exercism\rust\test\target\debug\deps\testing_crate-b92142a9c79df8a4.d: main.rs + +main.rs: