Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create random integer provider #21

Merged
merged 4 commits into from
Feb 16, 2024
Merged

Create random integer provider #21

merged 4 commits into from
Feb 16, 2024

Conversation

vianneybacoup
Copy link
Collaborator

Implement #17

@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch from b2f3fbc to 9e35290 Compare February 6, 2024 09:20
@vianneybacoup vianneybacoup linked an issue Feb 6, 2024 that may be closed by this pull request
@vianneybacoup vianneybacoup removed the request for review from hugues31 February 8, 2024 14:25
@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch 2 times, most recently from ff2fc14 to 3db7b68 Compare February 8, 2024 15:40
@hugues31
Copy link
Contributor

@vianneybacoup could you please add a few lines regarding the integer provider on our docs ? 😃

@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch from 3db7b68 to 529b39d Compare February 12, 2024 14:41
@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch from 529b39d to 6a2db8e Compare February 12, 2024 14:53
@vianneybacoup
Copy link
Collaborator Author

@vianneybacoup could you please add a few lines regarding the integer provider on our docs ? 😃

Done, you can review !

@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch from 6a2db8e to df9f949 Compare February 12, 2024 15:32
@vianneybacoup vianneybacoup force-pushed the random_integer_provider branch from df9f949 to bcf9f8a Compare February 13, 2024 08:42
@hugues31
Copy link
Contributor

Perfect, I merge :)

use yaml_rust::YamlLoader;

fn generate_provider(min: Option<&str>, max: Option<&str>) -> I32Provider {
let yaml_min = match min {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could try this syntax :

let yaml_min = min.map_or(String::new(), |value| format!("\nmin: {}", value));
let yaml_max = max.map_or(String::new(), |value| format!("\nmax: {}", value));

@hugues31 hugues31 merged commit 513143e into main Feb 16, 2024
3 checks passed
@hugues31 hugues31 deleted the random_integer_provider branch February 16, 2024 17:03
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.

[Feature] Create random integer provider
2 participants