rust-mobile / rust-android-examples

Various standalone Rust Android examples
112 stars 21 forks source link

Usage of let else statement in `na-winit-wgpu` (and possible elsewhere) could eliminate unnecessary nesting #13

Closed JohnScience closed 1 year ago

JohnScience commented 1 year ago

As I was assessing the maturity of Rust for mobile development, I tried different things.

I used na-winit-wgpu example as a template for https://github.com/JohnScience/winit_wgpu_android_native_activity.

While I was working on it, I noticed that you could make the code less nested with these stable features:

P.S.

Only after reading my message I realized that it would likely come across as being negative. You did an amazing job. I rewrote the title to make it more positive.

MarijnS95 commented 1 year ago

If you're assessing the maturity of the ecosystem by looking at examples and considering backwards compatibility with older (>6 months) Rust a bad thing, you're ~in the wrong place~ evaluating the wrong thing.