File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
-
3
2
name = " maxminddb"
4
- version = " 0.6.0 "
3
+ version = " 0.6.1 "
5
4
description = " Library for reading MaxMind DB format used by GeoIP2"
6
5
documentation = " http://oschwald.github.io/maxminddb-rust/maxminddb/struct.Reader.html"
7
6
readme = " README.md"
@@ -12,16 +11,14 @@ repository = "https://github.com/oschwald/maxminddb-rust"
12
11
license = " ISC"
13
12
14
13
[lib ]
15
-
16
14
name =" maxminddb"
17
15
crate_type = [" lib" , " dylib" , " staticlib" ]
18
16
path = " src/maxminddb/lib.rs"
19
17
20
18
[dependencies ]
21
-
22
- log = " 0.3.2"
19
+ log = " 0.3.4"
23
20
rustc-serialize = " 0.3.16"
24
- clippy = {version = " 0.0.21 " , optional = true }
21
+ clippy = {version = " 0.0.30 " , optional = true }
25
22
26
23
[features ]
27
24
default = []
Original file line number Diff line number Diff line change @@ -514,8 +514,7 @@ fn to_usize(base: u8, bytes: &[u8]) -> usize {
514
514
515
515
fn ip_to_bytes ( address : SocketAddr ) -> Vec < u8 > {
516
516
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 ( ) ,
519
518
SocketAddr :: V6 ( a) => {
520
519
let s = a. ip ( ) . segments ( ) ;
521
520
vec ! [ ( s[ 0 ] >> 8 ) as u8 ,
You can’t perform that action at this time.
0 commit comments