-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Remove silence warnings in exercises #391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9020494
e6b514b
b7ebfa6
3b0eb2e
ec6e479
b8aa6c1
2f90205
e530f6c
530943f
0d388b3
cbb893f
63a3855
7786eba
6806898
46b63f1
3e8a1e9
5e90f52
3b7ce1f
22b6ff3
e746c6f
84dc5ba
e8a76f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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); | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've tried to inline the format strings everywhere else in the course:
Suggested change
I also fixed a space, which makes me think that you've not looked at this in the browser after making the change? |
||||||
| unimplemented!() | ||||||
| } | ||||||
|
|
||||||
| pub fn name(&self) -> &str { | ||||||
| println!("Use name {:?}", self.name); | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't know if we've agreed that this is a good way to "fix" the warnings? I would have added such print statements already if this is a nice way to solve it 🙂 |
||||||
| 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!() | ||||||
| } | ||||||
| } | ||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't modify the
.pofiles — only the translators can update those.