rust-phonenumber icon indicating copy to clipboard operation
rust-phonenumber copied to clipboard

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

Open virtualritz opened this issue 2 years ago • 1 comments

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:

  • Fixed all doc-related warnings.
  • Updated the database to 8.13.35.
  • In Cargo.toml:
    • Bumped all deps .
    • Bumped the crate version to 0.3.5+8.13.35.

virtualritz avatar Apr 22 '24 19:04 virtualritz

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

rubdos avatar Apr 23 '24 07:04 rubdos

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

Done!

gferon avatar May 07 '24 07:05 gferon

Thanks a lot!

gferon avatar May 07 '24 07:05 gferon

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

gferon avatar May 07 '24 07:05 gferon

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 avatar May 07 '24 08:05 rubdos

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 :-)

rubdos avatar May 07 '24 14:05 rubdos

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

virtualritz avatar May 13 '24 13:05 virtualritz

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

gferon avatar May 13 '24 14:05 gferon