Generic Traits, Impls, and Slices in Rustlang

Published: 22 February 2023
on channel: chris biscardi
11,373
457

Generics can be super useful when you don't care about the specifics of a given type aside from very specific requirements. If we inform the Rust compiler that we only care about certain requirements, we can write one implementation that applies to a wide array of types instead of an implementation of a trait for every type.

This trait implementation can panic! Can you fix the panics caused by out of bounds indexing?

GitHub: https://github.com/rust-adventure/yt-...


Watch video Generic Traits, Impls, and Slices in Rustlang online without registration, duration hours minute second in high quality. This video was added by user chris biscardi 22 February 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 11,37 once and liked it 45 people.