Fix issue #13 and future hard error warning #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background: As a retired dev learning Rust I was interested in a Rust REPL and/or script runner for Mac, as I find the Rust playground a bit slow and limited. I looked at evcxr, irust, cargo-script, rust-script, ogma, cargo-play and Rust Playground for Macos, and or course Runner. I like rust-script and cargo-play, but I felt that Runner has the most versatility and freedom to experiment. Despite all this potential it currently seems to be dormant.
The changes proposed here are minimal and intended to fix the most intrusive issues, in particular #13.
For my own purposes I've upgraded my clone to 0.6.0 and included an enhancement for Issue #9 (stdin) as well as upgrading the edition to 2021, updating all the package versions and using rustc (emit metadata) to further check if a source containing fn main() is a well-formed Rust program. I've been careful to respect your choices in using the features of lapp and easy_shortcuts in particular. I want to keep it fast, slick, well-crafted, versatile and easy to use, to the best of my ability.
On my clone I've also let RustFmt auto-format the code and applied Clippy::pedantic suggestions to reduce background noise from Cargo as well as being educational for me. I would also like to extend it a bit further to have a REPL option, and refactor the main method to split out the different steps as individual methods. However, all of this means there are already a lot of lines of code with changes with potentially many more to come, and I want to respect your intentions and your expertise from which I've learnt a lot, so I'm open to either forking it or helping update it and take it further. Please let me know how you feel.
PS: Are you a fellow Saffer? Just noticed Jo'burg on your profile. I'm from KZN. Regards, Don Forbes