Skip to content

Conversation

@sumo-drosiek
Copy link
Contributor

@sumo-drosiek sumo-drosiek commented Apr 8, 2021

@sumo-drosiek
Copy link
Contributor Author

@perk-sumo Could we drop travis integration?

fn save_log(mut fd: &File, log: &String) -> u64 {
let write = fd.write_all(log.as_bytes());
match write {
Ok(_result) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this rust wizardry? _err and _result are magic variable accessible when a function returns a Result?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this would be better explanation, than me trying to do that :D. doc

}

fn get_random_word(wordlist: &Vec<String>) -> &String {
let mut rng = rand::thread_rng();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really so important but I guess this can somehow be initialized just once? Are there static variables in rust?

Copy link
Contributor Author

@sumo-drosiek sumo-drosiek Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ends with

error[E0133]: use of mutable static is unsafe and requires unsafe function or block

random_words: u32,
random_digits: u32,
) -> String {
let mut rng = rand::thread_rng();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here

@sumo-drosiek sumo-drosiek force-pushed the drosiek-logs-generator branch from 8e031f8 to 3832858 Compare April 26, 2021 06:53
@sumo-drosiek sumo-drosiek changed the title [WIP] Add logs-generator Add logs-generator Apr 26, 2021
@sumo-drosiek sumo-drosiek marked this pull request as ready for review April 26, 2021 06:53
Dominik Rosiek and others added 2 commits April 26, 2021 08:53
@sumo-drosiek sumo-drosiek force-pushed the drosiek-logs-generator branch from 3832858 to 9c5791f Compare April 26, 2021 06:54
@sumo-drosiek sumo-drosiek merged commit d9d053f into main Apr 28, 2021
@sumo-drosiek sumo-drosiek deleted the drosiek-logs-generator branch April 28, 2021 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants