summaryrefslogtreecommitdiff
path: root/exercises/quizzes/quiz3.rs
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/quizzes/quiz3.rs')
-rw-r--r--exercises/quizzes/quiz3.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/exercises/quizzes/quiz3.rs b/exercises/quizzes/quiz3.rs
index f255cb5..f3cb1bc 100644
--- a/exercises/quizzes/quiz3.rs
+++ b/exercises/quizzes/quiz3.rs
@@ -12,14 +12,14 @@
// to support alphabetical report cards. Change the Grade in the second test to
// "A+" to show that your changes allow alphabetical grades.
-pub struct ReportCard {
- pub grade: f32,
- pub student_name: String,
- pub student_age: u8,
+struct ReportCard {
+ grade: f32,
+ student_name: String,
+ student_age: u8,
}
impl ReportCard {
- pub fn print(&self) -> String {
+ fn print(&self) -> String {
format!(
"{} ({}) - achieved a grade of {}",
&self.student_name, &self.student_age, &self.grade