Skip to content

Commit bcdce4a

Browse files
04101937
1 parent eedf38d commit bcdce4a

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

exercises/conversions/from_into.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ impl Default for Person {
4343
// I AM NOT DONE
4444

4545
impl From<&str> for Person {
46-
fn from(s: &str) -> Person {
47-
}
46+
fn from(s: &str) -> Person {}
4847
}
4948

5049
fn main() {

exercises/conversions/using_as.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
// Execute `rustlings hint using_as` or use the `hint` watch subcommand for a
1111
// hint.
1212

13-
// I AM NOT DONE
14-
1513
fn average(values: &[f64]) -> f64 {
1614
let total = values.iter().sum::<f64>();
17-
total / values.len()
15+
total / values.len() as f64
1816
}
1917

2018
fn main() {

0 commit comments

Comments
 (0)