Add various other code refactorings

This commit is contained in:
Marcin Puc 2021-09-11 12:20:51 +02:00 committed by Martin Nordholts
parent 4baa346aae
commit 863d9cacd0

View file

@ -90,11 +90,10 @@ pub struct Config<'a> {
#[cfg(all(feature = "minimal-application", feature = "paging"))]
pub fn get_pager_executable(config_pager: Option<&str>) -> Option<String> {
if let Ok(Some(pager)) = crate::pager::get_pager(config_pager) {
Some(pager.bin)
} else {
None
}
crate::pager::get_pager(config_pager)
.ok()
.flatten()
.map(|pager| pager.bin)
}
#[test]