Closed ueco-jb closed 2 years ago
closes https://github.com/CosmWasm/rust-optimizer/issues/68
I tried to make "smarter" map, by changing it to .filter_map() like:
.filter_map()
.filter_map(|path| path.unwrap().is_dir().then(|| 0))
but it resulted in double reference which would have to be extra handled later on, so I decided that adding simple .filter() is good enough.
.filter()
(this .then() trick is something I found to make bool into Option<T> link)
.then()
bool
Option<T>
Ah, could you add a CHANGELOG entry to the Unreleased section for this?
closes https://github.com/CosmWasm/rust-optimizer/issues/68
I tried to make "smarter" map, by changing it to
.filter_map()
like:but it resulted in double reference which would have to be extra handled later on, so I decided that adding simple
.filter()
is good enough.(this
.then()
trick is something I found to makebool
intoOption<T>
link)