Use `map()` instead of `and_then()`

This commit is contained in:
Yuki Okushi 2019-10-02 07:42:48 +09:00
parent aa9bbe2114
commit f5da3a7006
1 changed files with 1 additions and 1 deletions
router/src

View File

@ -195,7 +195,7 @@ fn from_hex(v: u8) -> Option<u8> {
#[inline]
fn restore_ch(d1: u8, d2: u8) -> Option<u8> {
from_hex(d1).and_then(|d1| from_hex(d2).and_then(move |d2| Some(d1 << 4 | d2)))
from_hex(d1).and_then(|d1| from_hex(d2).map(move |d2| d1 << 4 | d2))
}
#[cfg(test)]