Skip to content

About ip2location #397

Answered by msk
sehkone asked this question in Q&A
Jan 14, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

The change was prompted by updates to the ip2location crate. In earlier versions, the lookup API required a mutable reference, which necessitated the use of Arc<Mutex<ip2location::DB>>. However, after updating the ip2location version for review-database, the compiler indicated that a mutable reference was no longer needed.

To confirm this, I checked the relevant code in the ip2location repository and found that the lookup API now takes a shared reference (&self) instead of a mutable one (&mut self). This change eliminated the need for a Mutex.

I chose version 0.5.4 in Cargo.toml because of this issue, which suggested improvements in the library's API. While the actual change to the refere…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sehkone
Comment options

sehkone Jan 19, 2025
Maintainer Author

Answer selected by sehkone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants