remove "get_with" method
This commit is contained in:
parent
20b50f591f
commit
4bf8b57950
2 changed files with 2 additions and 26 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue