We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b897e43 commit e23843eCopy full SHA for e23843e
src/std-traits/default.md
@@ -4,7 +4,7 @@ minutes: 5
4
5
# The `Default` Trait
6
7
-[`Default`][1] trait produces a default value for a type.
+The [`Default`][1] trait produces a default value for a type.
8
9
```rust,editable
10
#[derive(Debug, Default)]
src/std-traits/exercise.rs
@@ -53,7 +53,7 @@ mod test {
53
#[test]
54
fn binary() {
55
let input: Vec<u8> = (0..=255u8).collect();
56
- let mut rot = RotDecoder::<&[u8]> { input: input.as_ref(), rot: 13 };
+ let mut rot = RotDecoder::<&[u8]> { input: input.as_slice(), rot: 13 };
57
let mut buf = [0u8; 256];
58
assert_eq!(rot.read(&mut buf).unwrap(), 256);
59
for i in 0..=255 {
0 commit comments