build: Make borrowing compliant with older Rust

This commit is contained in:
Dorota Czaplejewicz
2019-10-16 12:04:17 +00:00
parent 35ad61890e
commit bd3b27eceb

View File

@ -112,7 +112,7 @@ fn list_layout_sources(
keyboards_path: Option<PathBuf>,
) -> Vec<DataSource> {
let mut ret = Vec::new();
{
let mut add_by_name = |name: &str| {
if let Some(path) = keyboards_path.clone() {
ret.push(DataSource::File(
@ -136,7 +136,7 @@ fn list_layout_sources(
};
add_by_name(FALLBACK_LAYOUT_NAME);
}
ret
}