2 releases
0.1.1 | Aug 25, 2021 |
---|---|
0.1.0 | Aug 24, 2021 |
#2959 in Rust patterns
10KB
241 lines
The one and only string type in Rust
let foo: &str = "foo".into();
let expected: &str = "foobar".into();
let mut foobar = foo.to_owned();
foobar.push_str("bar".into());
assert_eq!(foobar.deref(), expected);