#Rust lib feedback

9 messages · Page 1 of 1 (latest)

shy oracle
rigid matrix
#

For balance_password, you should either take a mutable string and just mutate, or make a copy and mutate that, but doing both seems a bit confusing

shy oracle
#

thanks for response I'll check

main bear
# shy oracle Hi, I encourage you to leave feedback and a star, the library is constantly bein...

I would suggest if you want to make the library dependency free you could implement a simple random number generator something like this:

use std::time::{SystemTime, UNIX_EPOCH};

fn main() {
    let charset = "some charset string";
    let nanos = SystemTime::now().duration_since(UNIX_EPOCH).unwrap().subsec_nanos() as f32;
    let index = ((nanos as f32).floor() as usize) % charset.len();
    println!("{}", index);
}

Also, Here is the playground link for this I would suggest checking this out as well:

https://play.rust-lang.org/?version=stable&mode=debug&edition=2021

fallow glen
main bear
main bear
# fallow glen please do not give bad advice

I mean they have one dependency rand. So they can essentially eliminate it. I mean why have a dependency when you can essentially implement it very easily. Like I don't see a reason to keep it. That's why I made the suggestion 😅 .

tardy sinew