Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace trim_whitespace implementation
originally proposed in a comment at Rust-for-Linux#911 (comment) - using while let allows us to combine all tests and the reminder construction into one pattern - without slice indexing and as such the use of the `Index` trait we can now also make the function `const` - a quick comparison on [Compiler Explorer](https://godbolt.org/z/Ex5dT8ffr) shows no changes in the resulting instructions, at least for the checked constellation Signed-off-by: Bennet Bleßmann <[email protected]>
- Loading branch information