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-generic-trait-and-impl/tree/9b856fb8e3c6e6dc4ce0af287a2595070c6ecd09
Download
0 formats
No download links available.
Generic Traits, Impls, and Slices in Rustlang | NatokHD