whisperfish / rust-phonenumber

Library for parsing, formatting and validating international phone numbers.
Apache License 2.0
162 stars 55 forks source link

Added `Database::iter()`, docs, DB update, deps bump. #70

Closed virtualritz closed 5 months ago

virtualritz commented 6 months ago

I mainly needed to iterate the DB contents to generate a list of countries/prefixes for a UI where the user enters a phone number. So I added Database::iter().

While at it, I also:

rubdos commented 6 months ago

@gferon we should install a CI step that checks whether the database update is a legitimate update.

gferon commented 5 months ago

we should install a CI step that checks whether the database update is a legitimate update.

Done!

gferon commented 5 months ago

Thanks a lot!

gferon commented 5 months ago

Looks like regex needs a more recent version of Rust. @rubdos how about bumping our MSRV to 1.65?

rubdos commented 5 months ago

Looks like regex needs a more recent version of Rust. @rubdos how about bumping our MSRV to 1.65?

Uh, do we actually need regex 1.10 for the new db to work? Because there's no reason to bump it in Cargo.toml if we don't.

EDIT: same with either. And I don't recall why sure why strum has this range for a version.

rubdos commented 5 months ago

And I don't recall why sure why strum has this range for a version.

Nevermind, that's because it's still on 0.x :-)

virtualritz commented 5 months ago

I downgraded the regex crate and also bumped the DB to .36.

gferon commented 5 months ago

Thanks a lot! Merged. I'll publish a new release now.

EDIT: here it is - https://crates.io/crates/phonenumber/0.3.5+8.13.36