Skip to content

Commit fd2c76c

Browse files
committed
Rollup merge of #26113 - tshepang:avoid-abbreviations, r=steveklabnik
2 parents 38a606a + 76102b0 commit fd2c76c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/doc/reference.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2835,13 +2835,13 @@ on the right-hand side.
28352835
An example of an `as` expression:
28362836

28372837
```
2838-
# fn sum(v: &[f64]) -> f64 { 0.0 }
2839-
# fn len(v: &[f64]) -> i32 { 0 }
2838+
# fn sum(values: &[f64]) -> f64 { 0.0 }
2839+
# fn len(values: &[f64]) -> i32 { 0 }
28402840
2841-
fn avg(v: &[f64]) -> f64 {
2842-
let sum: f64 = sum(v);
2843-
let sz: f64 = len(v) as f64;
2844-
return sum / sz;
2841+
fn average(values: &[f64]) -> f64 {
2842+
let sum: f64 = sum(values);
2843+
let size: f64 = len(values) as f64;
2844+
sum / size
28452845
}
28462846
```
28472847

0 commit comments

Comments
 (0)