rusty-diceware

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 08a10913812cc93964f6f86a3cc6b9a3320869e3
parent b69152079580605d52070ada63793464d00502c1
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Wed, 17 Oct 2018 13:59:48 +0300

Remove unsafe code

Diffstat:
Mbuild.rs | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/build.rs b/build.rs @@ -15,9 +15,7 @@ fn make_wordlist(contents: &std::string::String) -> Vec<&str> { } fn make_minilock_wordlist(contents: &str) -> Vec<&str> { - unsafe { - contents.slice_unchecked(1023, 543718).split(',').collect() - } + (&contents[1023..543718]).split(',').collect() } fn make_beale_struct(wordlist: Vec<&str>) -> std::string::String {