Skip to content

Commit 404a4ba

Browse files
committed
Clean up [u8;4] => Vec<u8>. Dep upgrades.
1 parent f16a8a8 commit 404a4ba

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[package]
2-
32
name = "maxminddb"
4-
version = "0.6.0"
3+
version = "0.6.1"
54
description = "Library for reading MaxMind DB format used by GeoIP2"
65
documentation = "http://oschwald.github.io/maxminddb-rust/maxminddb/struct.Reader.html"
76
readme = "README.md"
@@ -12,16 +11,14 @@ repository = "https://github.com/oschwald/maxminddb-rust"
1211
license = "ISC"
1312

1413
[lib]
15-
1614
name ="maxminddb"
1715
crate_type = ["lib", "dylib", "staticlib"]
1816
path = "src/maxminddb/lib.rs"
1917

2018
[dependencies]
21-
22-
log = "0.3.2"
19+
log = "0.3.4"
2320
rustc-serialize = "0.3.16"
24-
clippy = {version = "0.0.21", optional = true}
21+
clippy = {version = "0.0.30", optional = true}
2522

2623
[features]
2724
default = []

src/maxminddb/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,7 @@ fn to_usize(base: u8, bytes: &[u8]) -> usize {
514514

515515
fn ip_to_bytes(address: SocketAddr) -> Vec<u8> {
516516
match address {
517-
// I am sure there is a less horrible way to do this.
518-
SocketAddr::V4(a) => a.ip().octets().iter().map(|&x| x).collect(),
517+
SocketAddr::V4(a) => a.ip().octets().to_vec(),
519518
SocketAddr::V6(a) => {
520519
let s = a.ip().segments();
521520
vec![(s[0] >> 8) as u8,

0 commit comments

Comments
 (0)