Created
January 26, 2019 19:22
-
-
Save leopard627/79fa1c8e8f2209eab770e14d7bb89658 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[test] | |
fn indexed_string_test() { | |
let mut s = "hello slice literal"; | |
let is_okay = &s[0..1]; | |
let is_not_okay = &s[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment