1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-03 13:29:52 +02:00

Minor tweaks to std traits slides (#2738)

This commit is contained in:
Frances Wingerter
2025-05-06 15:54:21 +00:00
committed by GitHub
parent b897e43892
commit e23843e5e3
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ minutes: 5
# The `Default` Trait
[`Default`][1] trait produces a default value for a type.
The [`Default`][1] trait produces a default value for a type.
```rust,editable
#[derive(Debug, Default)]

View File

@ -53,7 +53,7 @@ mod test {
#[test]
fn binary() {
let input: Vec<u8> = (0..=255u8).collect();
let mut rot = RotDecoder::<&[u8]> { input: input.as_ref(), rot: 13 };
let mut rot = RotDecoder::<&[u8]> { input: input.as_slice(), rot: 13 };
let mut buf = [0u8; 256];
assert_eq!(rot.read(&mut buf).unwrap(), 256);
for i in 0..=255 {