Why does a struct referring to str with shorter lifetime compile in Rust?

Subscribers:
4,130
Published on ● Video Link: https://www.youtube.com/watch?v=gqUzTNtt0Uo



Duration: 2:49
4 views
0


Why does a struct referring to str with shorter lifetime compile in Rust?
I hope you found a solution that worked for you :)
The Content (except music & images) is licensed under (https://meta.stackexchange.com/help/licensing)CC BY-SA |
Thanks to all those great people for their contributions!

(stackoverflow.com/users/12303851/finlay-weber)Finlay Weber |
(stackoverflow.com/users/11423104/isaactfa)isaactfa |
(stackoverflow.com/users/5106317/%c3%96zg%c3%bcr-murat-sa%c4%9fd%c4%b1%c3%a7o%c4%9flu)Özgür Murat Sağdıçoğlu |
A special thanks goes out to the (https://stackoverflow.com/questions/74366709/why-does-a-struct-referring-to-str-with-shorter-lifetime-compile-in-rust)Stackexchange community |

I wish you all a wonderful day! Stay safe :)

rust







Tags:
rust