Skip to content

Weird Uuid::default() implementation #530

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

Open
tyilo opened this issue May 2, 2025 · 0 comments
Open

Weird Uuid::default() implementation #530

tyilo opened this issue May 2, 2025 · 0 comments
Assignees
Labels

Comments

@tyilo
Copy link
Contributor

tyilo commented May 2, 2025

The current Default implementation for Uuid returns Uuid::new() which returns a random UUID v4.

This is different from uuid::Uuid::default() which returns the nil UUID, which seems like a more reasonable default. I would normally expect that T::default() == T::default().

I think Uuid::default() should be changed to match uuid::Uuid and return a nil UUID.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants