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

feat: s2_request_token header (exercise idempotence) #86

Merged
merged 16 commits into from
Nov 29, 2024
Merged

Conversation

infiniteregrets
Copy link
Member

@infiniteregrets infiniteregrets commented Nov 28, 2024

closes #82

@infiniteregrets infiniteregrets requested a review from a team as a code owner November 28, 2024 02:28
src/append_session.rs Outdated Show resolved Hide resolved
src/service.rs Outdated Show resolved Hide resolved
src/service.rs Outdated
uuid::Uuid::new_v4()
.as_bytes()
.iter()
.fold(String::new(), |mut output, b| {
Copy link
Member

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

Copy link
Member

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()?

Copy link
Member Author

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

Copy link
Member

@shikhar shikhar Nov 29, 2024

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

Copy link
Member

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

src/service.rs Outdated Show resolved Hide resolved
@shikhar shikhar changed the title feat: s2_request_token header (exercise idempotentcy) feat: s2_request_token header (exercise idempotence) Nov 29, 2024
@infiniteregrets infiniteregrets merged commit c66a406 into main Nov 29, 2024
3 checks passed
@infiniteregrets infiniteregrets deleted the req-token branch November 29, 2024 05:26
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.

S2-Request-Token header
2 participants