remove "get_with" method

This commit is contained in:
F001 2018-05-26 19:55:40 +08:00
parent 20b50f591f
commit 4bf8b57950
2 changed files with 2 additions and 26 deletions

View file

@ -15,8 +15,6 @@ use std::cell::Cell;
fn main() {
let slice: &mut [i32] = &mut [1,2,3];
let cell_slice: &Cell<[i32]> = Cell::from_mut(slice);
assert_eq!(cell_slice.get_with(|v|v.len()), 3);
let sub_slice : &[Cell<i32>] = &cell_slice[1..];
assert_eq!(sub_slice.len(), 2);
}