Merge pull request #157 from Jultimate/patch-1

Update string.md
This commit is contained in:
Sunface
2022-03-16 14:14:45 +08:00
committed by GitHub

View File

@ -16,6 +16,16 @@ fn main() {
println!("{}",s)
}
```
```rust
fn main() {
let s: Box<&str> = "hello, world".into();
greetings(*s)
}
fn greetings(s: &str) {
println!("{}", s);
}
```
3.
```rust