Skip to content

Commit ccae633

Browse files
authored
Merge pull request #84 from gaoyifan/bugfix/ip-null-handling
Handle null IP API fields
2 parents 92ac48e + f15bbed commit ccae633

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/datasets/ip.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ pub struct AsnRouteInfo {
2020
pub prefix: IpNet,
2121
pub rpki: RpkiValidationState,
2222
pub name: String,
23-
pub country: String,
23+
pub country: Option<String>,
2424
}
2525

2626
#[derive(Debug, Clone, Serialize, Deserialize)]
2727
pub struct IpInfo {
2828
pub ip: String,
2929
#[serde(rename(serialize = "location"))]
30-
pub country: String,
30+
pub country: Option<String>,
3131
#[serde(rename(serialize = "network"))]
3232
pub asn: Option<AsnRouteInfo>,
3333
}

0 commit comments

Comments
 (0)