PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/src/test/run-pass/vec-slice.rs

http://github.com/jruderman/rust
Rust | 6 lines | 6 code | 0 blank | 0 comment | 2 complexity | f60454c64c22f8692c9863f7b2467130 MD5 | raw file
1fn main() {
2    let  v = ~[1,2,3,4,5];
3    let v2 = vec::slice(v, 1, 3);
4    assert (v2[0] == 2);
5    assert (v2[1] == 3);
6}