-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code Improvements #1
base: master
Are you sure you want to change the base?
Conversation
@jackpot51 Sorry for poking you, but I'm currently going through old forks and addressing stale PR's. |
Please try to compile this. |
Sorry about that. I believe that I've fixed the cargo build issues. |
} | ||
version | ||
let version = unsafe { self.get_str(b"VER:") }; | ||
String::from(version.trim_start_matches(' ')) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allocates twice, compared to the original code which only allocates a string once, then shifts the bytes around as necessary.
trim_start_matches
instead of while loopmatch
statements insrc/flash.rc
writeln!(stderr(), ...)
witheprintln!(...)