From 9020494352ad3c76924930ff17f3b29f3050da9a Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Fri, 10 Feb 2023 12:53:38 -0800 Subject: [PATCH 01/18] Update luhn.md --- src/exercises/day-2/luhn.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/exercises/day-2/luhn.md b/src/exercises/day-2/luhn.md index 648f222254f6..599a13bcc18a 100644 --- a/src/exercises/day-2/luhn.md +++ b/src/exercises/day-2/luhn.md @@ -21,9 +21,6 @@ function: ```rust -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] - {{#include luhn.rs:luhn}} unimplemented!() } From e6b514b7a076ee4cf0a8aa2e22d95153697285eb Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Fri, 10 Feb 2023 12:55:14 -0800 Subject: [PATCH 02/18] Update luhn.md Remove unused code warning #71 --- src/exercises/day-2/luhn.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exercises/day-2/luhn.md b/src/exercises/day-2/luhn.md index 599a13bcc18a..4933bc9a911b 100644 --- a/src/exercises/day-2/luhn.md +++ b/src/exercises/day-2/luhn.md @@ -21,7 +21,8 @@ function: ```rust -{{#include luhn.rs:luhn}} +pub fn luhn(cc_number: &str) -> bool { + println!("{cc_number}"); unimplemented!() } From b7ebfa6b702dbbf096f51961c3c2a78f90ad967f Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Wed, 1 Mar 2023 20:49:36 -0800 Subject: [PATCH 03/18] Update luhn.md --- src/exercises/day-2/luhn.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/exercises/day-2/luhn.md b/src/exercises/day-2/luhn.md index 4933bc9a911b..ebd46f7943bc 100644 --- a/src/exercises/day-2/luhn.md +++ b/src/exercises/day-2/luhn.md @@ -21,6 +21,7 @@ function: ```rust +{{#include luhn.rs:luhn}} pub fn luhn(cc_number: &str) -> bool { println!("{cc_number}"); unimplemented!() From 3b0eb2e555c3a2bfd22cc9cb724a51de16351a45 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Thu, 2 Mar 2023 21:35:59 -0800 Subject: [PATCH 04/18] Update luhn.md --- src/exercises/day-2/luhn.md | 1 - 1 file changed, 1 deletion(-) diff --git a/src/exercises/day-2/luhn.md b/src/exercises/day-2/luhn.md index ebd46f7943bc..05646072c251 100644 --- a/src/exercises/day-2/luhn.md +++ b/src/exercises/day-2/luhn.md @@ -22,7 +22,6 @@ function: ```rust {{#include luhn.rs:luhn}} -pub fn luhn(cc_number: &str) -> bool { println!("{cc_number}"); unimplemented!() } From ec6e479d980c211d9527aee2249acc7a4b030a28 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 11:09:09 -0800 Subject: [PATCH 05/18] Update strings-iterators.md --- src/exercises/day-2/strings-iterators.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/exercises/day-2/strings-iterators.md b/src/exercises/day-2/strings-iterators.md index fd92acdf9808..fdf28e3b185f 100644 --- a/src/exercises/day-2/strings-iterators.md +++ b/src/exercises/day-2/strings-iterators.md @@ -11,9 +11,10 @@ pass. Try avoiding allocating a `Vec` for your intermediate results: ```rust // TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] + {{#include strings-iterators.rs:prefix_matches}} + println!("Use parameters {prefix} and {request_path}"); unimplemented!() } From b8aa6c144510d9e3552df43eb616cecca1934c2a Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 11:11:15 -0800 Subject: [PATCH 06/18] Update for-loops.md --- src/exercises/day-1/for-loops.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/exercises/day-1/for-loops.md b/src/exercises/day-1/for-loops.md index c4824cb7dedf..e0c41adccf26 100644 --- a/src/exercises/day-1/for-loops.md +++ b/src/exercises/day-1/for-loops.md @@ -50,14 +50,14 @@ Copy the code below to and implement the functions: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] {{#include for-loops.rs:transpose}} + println!("Use matrix {:?}", matrix); unimplemented!() } {{#include for-loops.rs:pretty_print}} + println!("Use matrix {:?}", matrix); unimplemented!() } From 2f90205315ab2ee890d4d755b6cf839bf6c3cb77 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 11:18:05 -0800 Subject: [PATCH 07/18] Update strings-iterators.md --- src/exercises/day-2/strings-iterators.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/exercises/day-2/strings-iterators.md b/src/exercises/day-2/strings-iterators.md index fdf28e3b185f..41f3275b7a1c 100644 --- a/src/exercises/day-2/strings-iterators.md +++ b/src/exercises/day-2/strings-iterators.md @@ -10,8 +10,6 @@ pass. Try avoiding allocating a `Vec` for your intermediate results: ```rust -// TODO: remove this when you're done with your implementation. - {{#include strings-iterators.rs:prefix_matches}} println!("Use parameters {prefix} and {request_path}"); From e530f6c2a66b1e8453076613ae67051f97e3a51f Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 19:18:50 -0800 Subject: [PATCH 08/18] Update health-statistics.rs --- third_party/rust-on-exercism/health-statistics.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/third_party/rust-on-exercism/health-statistics.rs b/third_party/rust-on-exercism/health-statistics.rs index ddd5e905d5c3..b3f719ec1263 100644 --- a/third_party/rust-on-exercism/health-statistics.rs +++ b/third_party/rust-on-exercism/health-statistics.rs @@ -6,26 +6,32 @@ struct User { impl User { pub fn new(name: String, age: u32, weight: f32) -> Self { + println!("Use name {:?} age {:?} and weight{:?}", name, age, weight); unimplemented!() } pub fn name(&self) -> &str { + println!("Use name {:?}", self.name); unimplemented!() } pub fn age(&self) -> u32 { + println!("Use name {:?}", self.name); unimplemented!() } pub fn weight(&self) -> f32 { + println!("Use name {:?}", self.name); unimplemented!() } pub fn set_age(&mut self, new_age: u32) { + println!("Use name {:?} and new age {:?}", self.name, new_age); unimplemented!() } pub fn set_weight(&mut self, new_weight: f32) { + println!("Use name {:?} and new age {:?}", self.name, new_weight); unimplemented!() } } From 530943ffa6a55c0fad38b584b56c98fb6ddfeb43 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 19:19:40 -0800 Subject: [PATCH 09/18] Update health-statistics.md --- src/exercises/day-2/health-statistics.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/exercises/day-2/health-statistics.md b/src/exercises/day-2/health-statistics.md index 800adb9c19e0..0209d336412f 100644 --- a/src/exercises/day-2/health-statistics.md +++ b/src/exercises/day-2/health-statistics.md @@ -6,8 +6,6 @@ Copy the code below to and fill in the missing methods: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] {{#include ../../../third_party/rust-on-exercism/health-statistics.rs}} From 0d388b37931fa6f23f52da1b6fea59e0df7a3530 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 19:37:44 -0800 Subject: [PATCH 10/18] Update points-polygons.md --- src/exercises/day-2/points-polygons.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/exercises/day-2/points-polygons.md b/src/exercises/day-2/points-polygons.md index 08b4d2767895..fea9eec30dbe 100644 --- a/src/exercises/day-2/points-polygons.md +++ b/src/exercises/day-2/points-polygons.md @@ -5,8 +5,6 @@ to and fill in the missing methods to make the tests pass: ```rust -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] {{#include points-polygons.rs:Point}} // add fields From cbb893fc4e7deb0e72fbb63e42315c2ba04194f5 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 19:42:17 -0800 Subject: [PATCH 11/18] Update safe-ffi-wrapper.md --- src/exercises/day-3/safe-ffi-wrapper.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/exercises/day-3/safe-ffi-wrapper.md b/src/exercises/day-3/safe-ffi-wrapper.md index 7965add6e99e..a5b549f43da4 100644 --- a/src/exercises/day-3/safe-ffi-wrapper.md +++ b/src/exercises/day-3/safe-ffi-wrapper.md @@ -24,21 +24,24 @@ functions and methods: ```rust,should_panic // TODO: remove this when you're done with your implementation. -#![allow(unused_imports, unused_variables, dead_code)] +#![allow(unused_imports)] {{#include safe-ffi-wrapper.rs:ffi}} {{#include safe-ffi-wrapper.rs:DirectoryIterator}} + print!("The path", self.path) unimplemented!() } } {{#include safe-ffi-wrapper.rs:Iterator}} + print!("The path", self.path) unimplemented!() } } {{#include safe-ffi-wrapper.rs:Drop}} + print!("The path", self.path) unimplemented!() } } From 63a3855edd036db713f993a117ec088f081c2dbf Mon Sep 17 00:00:00 2001 From: Charisee Date: Mon, 6 Mar 2023 20:02:57 -0800 Subject: [PATCH 12/18] remove unused code warning --- po/da.po | 8 +------- src/exercises/day-3/safe-ffi-wrapper.md | 8 +++----- src/exercises/day-3/simple-gui.md | 2 -- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/po/da.po b/po/da.po index 4975c935d1ef..a1647c631bc7 100644 --- a/po/da.po +++ b/po/da.po @@ -2659,8 +2659,6 @@ msgstr "" #: src/exercises/day-2/health-statistics.md:13 msgid "" "```rust,should_panic\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-1/for-loops.md:56 @@ -3212,7 +3210,7 @@ msgstr "" #: src/memory-management/garbage-collection.md:1 msgid "# Automatic Memory Management" msgstr "" - +s #: src/memory-management/garbage-collection.md:3 msgid "" "An alternative to manual and scope-based memory management is automatic " @@ -5125,8 +5123,6 @@ msgstr "" #: src/exercises/day-2/strings-iterators.md:12 msgid "" "```rust\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-2/points-polygons.md:11 @@ -7344,8 +7340,6 @@ msgstr "" #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" "```rust,should_panic\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_imports, unused_variables, dead_code)]" msgstr "" #: src/exercises/day-3/simple-gui.md:22 diff --git a/src/exercises/day-3/safe-ffi-wrapper.md b/src/exercises/day-3/safe-ffi-wrapper.md index a5b549f43da4..9ed767cc615c 100644 --- a/src/exercises/day-3/safe-ffi-wrapper.md +++ b/src/exercises/day-3/safe-ffi-wrapper.md @@ -23,25 +23,23 @@ Copy the code below to and fill in the missing functions and methods: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_imports)] {{#include safe-ffi-wrapper.rs:ffi}} {{#include safe-ffi-wrapper.rs:DirectoryIterator}} - print!("The path", self.path) + print!("The path {:?}", path); unimplemented!() } } {{#include safe-ffi-wrapper.rs:Iterator}} - print!("The path", self.path) + print!("The path {:?}", self.path); unimplemented!() } } {{#include safe-ffi-wrapper.rs:Drop}} - print!("The path", self.path) + print!("The path {:?}", self.path); unimplemented!() } } diff --git a/src/exercises/day-3/simple-gui.md b/src/exercises/day-3/simple-gui.md index 2d35ef150e12..d466401da041 100644 --- a/src/exercises/day-3/simple-gui.md +++ b/src/exercises/day-3/simple-gui.md @@ -16,8 +16,6 @@ Copy the code below to , fill in the missing `draw_into` methods so that you implement the `Widget` trait: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_imports, unused_variables, dead_code)] {{#include simple-gui.rs:setup}} From 7786eba7a1cdc0d24bb2826d7976b852a7fb4ff3 Mon Sep 17 00:00:00 2001 From: Charisee Date: Mon, 6 Mar 2023 20:02:57 -0800 Subject: [PATCH 13/18] remove unused code warning --- po/da.po | 6 ------ src/exercises/day-3/safe-ffi-wrapper.md | 8 +++----- src/exercises/day-3/simple-gui.md | 2 -- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/po/da.po b/po/da.po index 4975c935d1ef..6b3ce1a2892f 100644 --- a/po/da.po +++ b/po/da.po @@ -2659,8 +2659,6 @@ msgstr "" #: src/exercises/day-2/health-statistics.md:13 msgid "" "```rust,should_panic\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-1/for-loops.md:56 @@ -5125,8 +5123,6 @@ msgstr "" #: src/exercises/day-2/strings-iterators.md:12 msgid "" "```rust\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-2/points-polygons.md:11 @@ -7344,8 +7340,6 @@ msgstr "" #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" "```rust,should_panic\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_imports, unused_variables, dead_code)]" msgstr "" #: src/exercises/day-3/simple-gui.md:22 diff --git a/src/exercises/day-3/safe-ffi-wrapper.md b/src/exercises/day-3/safe-ffi-wrapper.md index a5b549f43da4..9ed767cc615c 100644 --- a/src/exercises/day-3/safe-ffi-wrapper.md +++ b/src/exercises/day-3/safe-ffi-wrapper.md @@ -23,25 +23,23 @@ Copy the code below to and fill in the missing functions and methods: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_imports)] {{#include safe-ffi-wrapper.rs:ffi}} {{#include safe-ffi-wrapper.rs:DirectoryIterator}} - print!("The path", self.path) + print!("The path {:?}", path); unimplemented!() } } {{#include safe-ffi-wrapper.rs:Iterator}} - print!("The path", self.path) + print!("The path {:?}", self.path); unimplemented!() } } {{#include safe-ffi-wrapper.rs:Drop}} - print!("The path", self.path) + print!("The path {:?}", self.path); unimplemented!() } } diff --git a/src/exercises/day-3/simple-gui.md b/src/exercises/day-3/simple-gui.md index 2d35ef150e12..d466401da041 100644 --- a/src/exercises/day-3/simple-gui.md +++ b/src/exercises/day-3/simple-gui.md @@ -16,8 +16,6 @@ Copy the code below to , fill in the missing `draw_into` methods so that you implement the `Widget` trait: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_imports, unused_variables, dead_code)] {{#include simple-gui.rs:setup}} From 5e90f525b4ef6f2a18bb2b90170929f65ff5cc43 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 20:22:32 -0800 Subject: [PATCH 14/18] Update da.po --- po/da.po | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/po/da.po b/po/da.po index 6b3ce1a2892f..8419dd8b0e3d 100644 --- a/po/da.po +++ b/po/da.po @@ -5123,6 +5123,8 @@ msgstr "" #: src/exercises/day-2/strings-iterators.md:12 msgid "" "```rust\n" +"// TODO: remove this when you're done with your implementation.\n" +"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-2/points-polygons.md:11 @@ -7340,6 +7342,8 @@ msgstr "" #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" "```rust,should_panic\n" +"// TODO: remove this when you're done with your implementation.\n" +"#![allow(unused_imports, unused_variables, dead_code)]" msgstr "" #: src/exercises/day-3/simple-gui.md:22 From 3b7ce1f9a703833103842d8175f12867f5f03266 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 20:27:17 -0800 Subject: [PATCH 15/18] Update da.po --- po/da.po | 2 -- 1 file changed, 2 deletions(-) diff --git a/po/da.po b/po/da.po index 8419dd8b0e3d..3262c27fb21e 100644 --- a/po/da.po +++ b/po/da.po @@ -5123,8 +5123,6 @@ msgstr "" #: src/exercises/day-2/strings-iterators.md:12 msgid "" "```rust\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_variables, dead_code)]" msgstr "" #: src/exercises/day-2/points-polygons.md:11 From 22b6ff3f6848b7ee4d9b02e5ab37c04a38bae358 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 20:31:21 -0800 Subject: [PATCH 16/18] Update da.po --- po/da.po | 2 -- 1 file changed, 2 deletions(-) diff --git a/po/da.po b/po/da.po index 3262c27fb21e..6b3ce1a2892f 100644 --- a/po/da.po +++ b/po/da.po @@ -7340,8 +7340,6 @@ msgstr "" #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" "```rust,should_panic\n" -"// TODO: remove this when you're done with your implementation.\n" -"#![allow(unused_imports, unused_variables, dead_code)]" msgstr "" #: src/exercises/day-3/simple-gui.md:22 From e746c6f8c74f9641af224b80cfce16d31be00d01 Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 20:36:52 -0800 Subject: [PATCH 17/18] Update da.po --- po/da.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/da.po b/po/da.po index 6b3ce1a2892f..88b3dbe8534a 100644 --- a/po/da.po +++ b/po/da.po @@ -7339,7 +7339,7 @@ msgstr "" #: src/exercises/day-3/simple-gui.md:18 #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" -"```rust,should_panic\n" +"```rust,should_panic" msgstr "" #: src/exercises/day-3/simple-gui.md:22 From 84dc5ba2e37031f18f21aa0cff521ec2c28be5dd Mon Sep 17 00:00:00 2001 From: Charisee Chiw Date: Mon, 6 Mar 2023 20:36:52 -0800 Subject: [PATCH 18/18] Update da.po --- po/da.po | 2 +- src/exercises/day-1/book-library.md | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/po/da.po b/po/da.po index 6b3ce1a2892f..88b3dbe8534a 100644 --- a/po/da.po +++ b/po/da.po @@ -7339,7 +7339,7 @@ msgstr "" #: src/exercises/day-3/simple-gui.md:18 #: src/exercises/day-3/safe-ffi-wrapper.md:25 msgid "" -"```rust,should_panic\n" +"```rust,should_panic" msgstr "" #: src/exercises/day-3/simple-gui.md:22 diff --git a/src/exercises/day-1/book-library.md b/src/exercises/day-1/book-library.md index 34f9b0b1aca3..3623e6ae6787 100644 --- a/src/exercises/day-1/book-library.md +++ b/src/exercises/day-1/book-library.md @@ -18,8 +18,6 @@ Use this to create a library application. Copy the code below to and update the types to make it compile: ```rust,should_panic -// TODO: remove this when you're done with your implementation. -#![allow(unused_variables, dead_code)] {{#include book-library.rs:setup}}