johnstonskj / rust-email_address

A Rust crate providing an implementation of an RFC-compliant `EmailAddress` newtype.
MIT License
66 stars 14 forks source link

Add `EmailAddress::new_unchecked` #10

Closed soerenmeier closed 2 years ago

soerenmeier commented 2 years ago

This allows to create the EmailAddress struct without needing to validate the address. This can be used for example if you need to store the address as a string somewhere and you know that it is a valid email address.

Sorry for another PR, since you already released a new version.

johnstonskj commented 2 years ago

Fantastic, I usually add these, so it's a good catch.

soerenmeier commented 2 years ago

Sorry for the formatting issues, should i do something about it?

soerenmeier commented 2 years ago

I force pushed on my branch with the whitespaces removed, not sure if that helps. https://github.com/soerenmeier/rust-email_address/commit/aebc70cb1ba26394d32f9e3696adccbf89ddd7f0

soerenmeier commented 2 years ago

Saw you fixed it