rust-lang-nursery / rust-cookbook

https://rust-lang-nursery.github.io/rust-cookbook
Creative Commons Zero v1.0 Universal
2.24k stars 286 forks source link

Indexing a map with a non-Copy structural key #653

Open SOF3 opened 2 years ago

SOF3 commented 2 years ago

kennytm on StackOverflow provided a great explanation to this problem. It appears that this cannot be generically implemented in a library (because the idea can be extended to tuples, arrays, ad-hoc structs, etc.). Seems appropriate material for this book.