-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use Cow<'a, str> for return value of parse(...) instead of String * more copy reduction * more minor tweaks to reduce copying * Thread SmallRng through functions to avoid repeated initialization * better lifetime naming * faster implementation of 'scramble' * use Cow in implementation of 'fixed' * add missing file * tidy up code * remove unnecessary call to to_string * don't clone state.position every time row_parser::parse is called * code style
- Loading branch information
1 parent
7c96d9c
commit fd073f0
Showing
5 changed files
with
219 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
use rand::rngs::SmallRng; | ||
use rand::SeedableRng; | ||
|
||
pub fn get() -> SmallRng { | ||
SmallRng::from_rng(rand::thread_rng()).unwrap_or_else(|_| SmallRng::from_entropy()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.