CosmWasm / optimizer

Dockerfile and script to deterministically produce the smallest possible Wasm for your Rust contract
Apache License 2.0
123 stars 60 forks source link

Add is_dir check to build workspace #69

Closed ueco-jb closed 2 years ago

ueco-jb commented 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(|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.

(this .then() trick is something I found to make bool into Option<T> link)

webmaster128 commented 2 years ago

Ah, could you add a CHANGELOG entry to the Unreleased section for this?