Created
June 24, 2017 08:43
-
-
Save umurgdk/9aac5e3804a126a9ee645ba17a810a07 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
| pub fn remove_child(&mut self, child: &Box<View>) -> Option<Box<View>> | |
| { | |
| match self.children.iter().position(|v| ptr::eq(v, child)) { | |
| Some(index) => Some(self.children.remove(index)), | |
| None => None | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment