Closed ysthakur closed 3 years ago
✔️ Deploy Preview for try-in-browser ready!
🔨 Explore the source changes: 59f538e8598929b140ffd6c2ae2db9a396e659de
🔍 Inspect the deploy log: https://app.netlify.com/sites/try-in-browser/deploys/61130359dd5ee700076a9d45
😎 Browse the preview: https://deploy-preview-9--try-in-browser.netlify.app
I managed to do this myself, without sacrificing any of &dyn
avoiding, conditional ExampleLang
, etc.
Somewhat messy, but this allows you to only add a language in one place in
lang/mod.rs
. However, since it uses a global immutable variable, you can't add the example language based on the config. I think that's alright, though. I'm also not sure if the functions need to be references or not, or ifLanguage
should be a trait so thatdyn Language
can be used.