diff --git a/src/utf8.rs b/src/utf8.rs index 7bcfdca..f60ca34 100644 --- a/src/utf8.rs +++ b/src/utf8.rs @@ -6,6 +6,7 @@ use std::char::from_u32; /// function to get more if needed. /// /// Returns an error if the stream is invalid utf-8. +#[allow(dead_code)] pub fn read_char(first: u8, next: F) -> Result where F: Fn() -> Option { @@ -46,6 +47,7 @@ pub fn read_char(first: u8, next: F) -> Result } // Returns a simple bitmask with n 1s to the right. +#[allow(dead_code)] fn make_mask(n: usize) -> u8 { let mut r = 0u8; for i in 0..n { diff --git a/src/views/id_view.rs b/src/views/id_view.rs index 81e2b64..3ef6c5e 100644 --- a/src/views/id_view.rs +++ b/src/views/id_view.rs @@ -64,11 +64,10 @@ impl ViewWrapper for IdView { fn wrap_call_on_any<'a>(&mut self, selector: &Selector, mut callback: Box FnMut(&'b mut Any) + 'a>) { - let result = match selector { + match selector { &Selector::Id(id) if id == self.id => callback(self), s => self.view.borrow_mut().call_on_any(s, callback), - }; - result + } } fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()> {