I am learning rust. I read an article about static
https://practice.rs/lifetime/static.html
The main idea is clear - static lifetime means that reference is live till the end of the program.
fn main(){
let message;
{
let words = get_message();
message = words;
}
println!("message: {}", message);
}
fn get_message() -> &'static str {
"hello"
}
But what is profit of the static in production code?
Could you please provide example from real (production code) of 'static usage?