fn immutable_references() {
    let s1 = String::from("hello");

    let len = calculate_length(&s1);

    println!("The length of '{}' is {}.", s1, len);
}
// Here, s goes out of scope. But because it does not have ownership of what
// it refers to, nothing happens.
Here, s goes out of scope. But because it does not have ownership of what
it refers to, nothing happens.
Here s goes out of scope . But because it does not have ownership of what it refers to nothing happens .
fn immutable_references() {
    let s1 = String::from("hello");
    let len = calculate_length(&s1);
    println!("The length of '{}' is {}.", s1, len);
}
fn immutable_references ( ) { let s1 = String :: from ( " " ) ; let len = calculate_length ( & s1 ) ; println ! ( " " s1 len ) ; }
Here, s goes out of scope.
Here s goes out of scope .