-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: s2_request_token header (exercise idempotence) #86
Conversation
src/service.rs
Outdated
uuid::Uuid::new_v4() | ||
.as_bytes() | ||
.iter() | ||
.fold(String::new(), |mut output, b| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with_capacity(32)
seems fair
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could also just use the default to_string()
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant use to_string, as hex conversion traits are not implemented for chars
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant on the Uuid
object, which would produce hex (with hyphens, but that's ok) https://docs.rs/uuid/latest/uuid/struct.Uuid.html#formatting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh simple().to_string()
would give you exactly this
closes #82