Skip to content

Commit cc40541

Browse files
committed
release v.0.2.1
1 parent 3941cd6 commit cc40541

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.2.1] - 2024-04-10
6+
7+
### 🚜 Refactor
8+
9+
- Parameter constructor
10+
11+
### 📚 Documentation
12+
13+
- Update documentation
14+
515
## [0.2.0] - 2024-04-10
616

717
### 🚀 Features

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "public-ip-address"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55
authors = ["Tomash Ghz <ghz.tomash@hotmail.com>"]
66
description = "A simple library for performing public IP and geolocation lookups from various services."

src/lookup/mod.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,7 @@ impl LookupProvider {
192192
.ok_or(LookupError::GenericError("No provider given".to_string()))?;
193193
let provider = p.parse::<LookupProvider>()?;
194194
// get the key if it exists
195-
let key = match s.get(1) {
196-
Some(key) => Some(Parameters::new(key.to_owned())),
197-
None => None,
198-
};
195+
let key = s.get(1).map(|key| Parameters::new(key.to_owned()));
199196
Ok((provider, key))
200197
}
201198
}

0 commit comments

Comments
 (0)