From 4329c0383e89227d24d29a81b752a2e466a8097b Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 23 Aug 2018 23:19:38 +0200 Subject: [PATCH] Untested updates for modern Rust --- Cargo.lock | 878 ++++++++++++------------ Cargo.toml | 7 +- rustfmt.toml | 11 - src/flowgger/config.rs | 2 +- src/flowgger/decoder/gelf_decoder.rs | 2 +- src/flowgger/decoder/ltsv_decoder.rs | 32 +- src/flowgger/decoder/rfc5424_decoder.rs | 9 +- src/flowgger/encoder/capnp_encoder.rs | 16 +- src/flowgger/encoder/gelf_encoder.rs | 6 +- src/flowgger/encoder/ltsv_encoder.rs | 3 +- src/flowgger/input/redis_input.rs | 6 +- src/flowgger/input/stdin_input.rs | 3 +- src/flowgger/input/tcp/mod.rs | 6 +- src/flowgger/input/tcp/tcpco_input.rs | 5 +- src/flowgger/input/tls/mod.rs | 26 +- src/flowgger/input/tls/tlsco_input.rs | 8 +- src/flowgger/input/udp_input.rs | 11 +- src/flowgger/mod.rs | 4 +- src/flowgger/output/debug_output.rs | 24 +- src/flowgger/output/kafka_output.rs | 11 +- src/flowgger/output/mod.rs | 2 +- src/flowgger/output/tls_output.rs | 67 +- src/flowgger/record_capnp.rs | 332 +++++---- src/flowgger/splitter/mod.rs | 2 +- src/main.rs | 3 +- 25 files changed, 753 insertions(+), 723 deletions(-) delete mode 100644 rustfmt.toml diff --git a/Cargo.lock b/Cargo.lock index 265881f..9473190 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,75 +1,60 @@ -[root] -name = "flowgger" -version = "0.2.6" +[[package]] +name = "ansi_term" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "capnp 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", - "capnpc 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)", - "chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "clap 2.26.2 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy 0.0.164 (git+https://github.com/Manishearth/rust-clippy)", - "coio 0.2.0 (git+https://github.com/zonyitoo/coio-rs)", - "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "kafka 0.6.2 (git+https://github.com/spicavigo/kafka-rust)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", - "redis 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "ansi_term" -version = "0.9.0" +name = "ascii" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "atty" -version = "0.2.2" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace" -version = "0.3.3" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)", - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "backtrace-sys" -version = "0.1.14" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "bitflags" -version = "0.7.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "bitflags" -version = "0.9.1" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "build_const" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -79,157 +64,123 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "byteorder" -version = "1.1.0" +version = "1.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "capnp" -version = "0.8.11" +name = "bytes" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "capnpc" -version = "0.8.7" +name = "capnp" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "capnp 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "cargo_metadata" -version = "0.2.3" +name = "capnpc" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "capnp 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "cc" -version = "1.0.0" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "cfg-if" -version = "0.1.2" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "chrono" -version = "0.4.0" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "clap" -version = "2.26.2" +version = "2.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", - "atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "textwrap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "clippy" -version = "0.0.164" -source = "git+https://github.com/Manishearth/rust-clippy#387efd459c0ad3db7af15f1a573057b8587f9748" -dependencies = [ - "cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "clippy_lints 0.0.164 (git+https://github.com/Manishearth/rust-clippy)", -] - -[[package]] -name = "clippy_lints" -version = "0.0.164" -source = "git+https://github.com/Manishearth/rust-clippy#387efd459c0ad3db7af15f1a573057b8587f9748" +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "itertools 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", - "toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "coio" version = "0.2.0" -source = "git+https://github.com/zonyitoo/coio-rs#f5f6f4044a7cceff387ace0f04ffeb3bc3ab979a" +source = "git+https://github.com/jedisct1/coio-rs#45da1e4d8b9c0e2e5a9563b0d869f1281dbeb805" dependencies = [ - "context 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "context 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "deque 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)", - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-more 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", + "time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "context" -version = "2.0.0" +name = "combine" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)", - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "conv" -version = "0.3.3" +name = "context" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "crc" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "crc-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "crc-core" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "custom_derive" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "dbghelp-sys" -version = "0.2.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -242,14 +193,9 @@ name = "dtoa" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "dtoa" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "either" -version = "1.1.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -257,7 +203,7 @@ name = "error-chain" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -265,82 +211,115 @@ name = "flate2" version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "flate2" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "flowgger" +version = "0.2.6" +dependencies = [ + "capnp 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "capnpc 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", + "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", + "coio 0.2.0 (git+https://github.com/jedisct1/coio-rs)", + "flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "kafka 0.7.0 (git+https://github.com/spicavigo/kafka-rust)", + "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", + "redis 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", + "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_json 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)", + "toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "fnv" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "foreign-types" -version = "0.2.0" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "foreign-types-shared" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "gcc" -version = "0.3.54" +name = "fuchsia-zircon-sys" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "getopts" -version = "0.2.15" +name = "futures" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "idna" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", "unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "iovec" -version = "0.1.0" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "itertools" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "itoa" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "itoa" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "kafka" -version = "0.6.2" -source = "git+https://github.com/spicavigo/kafka-rust#9a3b427bd702810bcd13cf60e58cb18d5f403c1a" +version = "0.7.0" +source = "git+https://github.com/spicavigo/kafka-rust#eb48ee9d7fe186766257454b5fe3c4d16b411505" dependencies = [ "byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", - "crc 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)", + "crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)", - "fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", + "fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)", "ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "snap 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "snap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -354,17 +333,25 @@ dependencies = [ [[package]] name = "lazy_static" -version = "0.2.8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "lazycell" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "lazycell" -version = "0.5.1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "libc" -version = "0.2.31" +version = "0.2.43" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -374,201 +361,230 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "log" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "magenta" -version = "0.1.1" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "magenta-sys" -version = "0.1.1" +name = "log" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "matches" -version = "0.1.6" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "memchr" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "miniz-sys" version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "mio" -version = "0.6.10" +version = "0.6.15" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "miow" -version = "0.2.1" +name = "mio-more" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "net2" -version = "0.2.31" +name = "mio-uds" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "miow" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", + "net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", "ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "num" -version = "0.1.40" +name = "net2" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-integer" -version = "0.1.35" +version = "0.1.39" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "num-iter" -version = "0.1.34" +name = "num-traits" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "num-traits" -version = "0.1.40" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "openssl" -version = "0.9.19" +version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)", + "foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "openssl-sys" -version = "0.9.19" +version = "0.9.35" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)", - "vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", + "vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "percent-encoding" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "pkg-config" -version = "0.3.9" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "pulldown-cmark" -version = "0.0.15" +name = "rand" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", - "getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "quine-mc_cluskey" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "quote" -version = "0.3.15" +name = "rand" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "rand" -version = "0.3.16" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", + "fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "rand_core" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "redis" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "combine 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "redox_syscall" -version = "0.1.31" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "ref_slice" -version = "1.1.1" +name = "redox_termios" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] -name = "regex-syntax" -version = "0.4.1" +name = "ref_slice" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rustc-demangle" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -576,48 +592,11 @@ name = "rustc-serialize" version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "semver" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "serde" version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "serde" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" - -[[package]] -name = "serde_derive" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive_internals 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "serde_derive_internals" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "serde_json" version = "0.8.6" @@ -625,115 +604,135 @@ source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "dtoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "serde_json" -version = "1.0.3" +name = "sha1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", - "itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", -] [[package]] -name = "sha1" -version = "0.2.0" +name = "slab" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "slab" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "snap" -version = "0.2.2" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "strsim" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "syn" -version = "0.11.11" +name = "termion" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", - "synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "synom" -version = "0.11.3" +name = "textwrap" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "term_size" -version = "0.3.0" +name = "time" +version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "textwrap" -version = "0.8.0" +name = "tokio-codec" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "time" -version = "0.1.38" +name = "tokio-executor" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] -name = "toml" -version = "0.2.1" +name = "tokio-io" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", + "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", + "futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)", + "iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "toml" -version = "0.4.5" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "twox-hash" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)", + "rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -741,42 +740,55 @@ name = "unicode-bidi" version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "unicode-normalization" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "unicode-width" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] -name = "unicode-xid" -version = "0.0.4" +name = "unreachable" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "url" -version = "1.5.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", + "matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", + "percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "vcpkg" -version = "0.2.2" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "vec_map" -version = "0.8.0" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "version_check" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "void" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] @@ -784,11 +796,30 @@ name = "winapi" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "winapi-build" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "ws2_32-sys" version = "0.2.1" @@ -799,105 +830,106 @@ dependencies = [ ] [metadata] -"checksum ansi_term 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23ac7c30002a5accbf7e8987d0632fa6de155b7c3d39d0067317a391e00a2ef6" -"checksum atty 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d912da0db7fa85514874458ca3651fe2cddace8d0b0505571dbdcd41ab490159" -"checksum backtrace 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "99f2ce94e22b8e664d95c57fff45b98a966c2252b60691d0b7aeeccd88d70983" -"checksum backtrace-sys 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "c63ea141ef8fdb10409d0f5daf30ac51f84ef43bff66f16627773d2a292cd189" -"checksum bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aad18937a628ec6abcd26d1489012cc0e18c21798210f491af69ded9b881106d" +"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +"checksum ascii 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3ae7d751998c189c1d4468cf0a39bb2eae052a9c58d50ebb3b9591ee3813ad50" +"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" +"checksum backtrace 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "89a47830402e9981c5c41223151efcced65a0510c13097c769cede7efb34782a" +"checksum backtrace-sys 0.1.24 (registry+https://github.com/rust-lang/crates.io-index)" = "c66d56ac8dabd07f6aacdaf633f4b8262f5b3601a810a0dcddffd5c22c69daa0" "checksum bitflags 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4efd02e230a02e18f92fc2735f44597385ed02ad8f831e7c1c1156ee5e1ab3a5" -"checksum build_const 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e90dc84f5e62d2ebe7676b83c22d33b6db8bd27340fb6ffbff0a364efa0cb9c9" +"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" +"checksum build_const 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "39092a32794787acd8525ee150305ff051b0aa6cc2abaf193924f5ab05425f39" "checksum byteorder 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855" -"checksum byteorder 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ff81738b726f5d099632ceaffe7fb65b90212e8dce59d518729e7e8634032d3d" -"checksum capnp 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "6c49efbd14259f397f9b8738f0485ffb53b44ae711a7ce9fdfe73f3cb5d470e1" -"checksum capnpc 0.8.7 (registry+https://github.com/rust-lang/crates.io-index)" = "5eb630656e23f1316d88bad8be37047ba9c6fc89c3e9dbe060c1a91b229918e2" -"checksum cargo_metadata 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "be1057b8462184f634c3a208ee35b0f935cfd94b694b26deadccd98732088d7b" -"checksum cc 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7db2f146208d7e0fbee761b09cd65a7f51ccc38705d4e7262dad4d73b12a76b1" -"checksum cfg-if 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "d4c819a1287eb618df47cc647173c5c4c66ba19d888a6e50d605672aed3140de" -"checksum chrono 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7c20ebe0b2b08b0aeddba49c609fe7957ba2e33449882cb186a180bc60682fa9" -"checksum clap 2.26.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3451e409013178663435d6f15fdb212f14ee4424a3d74f979d081d0a66b6f1f2" -"checksum clippy 0.0.164 (git+https://github.com/Manishearth/rust-clippy)" = "" -"checksum clippy_lints 0.0.164 (git+https://github.com/Manishearth/rust-clippy)" = "" -"checksum coio 0.2.0 (git+https://github.com/zonyitoo/coio-rs)" = "" -"checksum context 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60856a7689af04f538e5fba0e3a787f68d6afb46af681ad6a6a6272910458a9e" -"checksum conv 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "78ff10625fd0ac447827aa30ea8b861fead473bb60aeb73af6c1c58caf0d1299" -"checksum crc 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fba69ea0e15e720f7e1cfe1cf3bc55007fbd41e32b8ae11cfa343e7e5961e79a" -"checksum crc-core 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "003d1170779d405378223470f5864b41b79a91969be1260e4de7b4ec069af69c" -"checksum custom_derive 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "ef8ae57c4978a2acd8b869ce6b9ca1dfe817bff704c220209fdef2c0b75a01b9" -"checksum dbghelp-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "97590ba53bcb8ac28279161ca943a924d1fd4a8fb3fa63302591647c4fc5b850" +"checksum byteorder 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8389c509ec62b9fe8eca58c502a0acaf017737355615243496cde4994f8fa4f9" +"checksum bytes 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e178b8e0e239e844b083d5a0d4a156b2654e67f9f80144d48398fcd736a24fb8" +"checksum capnp 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b3cfa57795aeab467713586aa427c82c9ea0bf917c641c95cd7966f0681ecd80" +"checksum capnpc 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6f85b818d7d9d63ca794b96b00ff28e2c44cfeeec6adb44fa4b4de8e05eb4e75" +"checksum cc 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)" = "3cc738b39aea615873af94099619ed6915a82575880ed5cdfbf17b63307f1b14" +"checksum cfg-if 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "0c4e7bb64a8ebb0d856483e1e682ea3422f883c5f5615a90d51a2c82fe87fdd3" +"checksum chrono 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e48d85528df61dc964aa43c5f6ca681a19cfa74939b2348d204bd08a981f2fb0" +"checksum clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b957d88f4b6a63b9d70d5f454ac8011819c6efa7727858f458ab71c756ce2d3e" +"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +"checksum coio 0.2.0 (git+https://github.com/jedisct1/coio-rs)" = "" +"checksum combine 3.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e67be864b6450c26fdb9242dee53a46fb9648d0b1a65521a6a1947b54fa011e" +"checksum context 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "54c3a572602998217082b234bc06846daec11ce690b0c44955d130f09941ecb2" +"checksum crc 1.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d663548de7f5cca343f1e0a48d14dcfb0e9eb4e079ec58883b7251539fa10aeb" "checksum deque 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a694dae478589798d752c7125542f8a5ae8b6e59476172baf2eed67357bdfa27" "checksum dtoa 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0dd841b58510c9618291ffa448da2e4e0f699d984d436122372f446dae62263d" -"checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum either 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "18785c1ba806c258137c937e44ada9ee7e69a37e3c72077542cd2f069d78562a" +"checksum either 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3be565ca5c557d7f59e7cfcf1844f9e3033650c929c6566f511e8005f205c1d0" "checksum error-chain 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d9435d864e017c3c6afeac1654189b06cdb491cf2ff73dbf0d73b0f292f42ff8" "checksum flate2 0.2.20 (registry+https://github.com/rust-lang/crates.io-index)" = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" -"checksum fnv 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc484842f1e2884faf56f529f960cc12ad8c71ce96cc7abba0a067c98fee344" -"checksum foreign-types 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3e4056b9bd47f8ac5ba12be771f77a0dae796d1bbaaf5fd0b9c2d38b69b8a29d" -"checksum gcc 0.3.54 (registry+https://github.com/rust-lang/crates.io-index)" = "5e33ec290da0d127825013597dbdfc28bee4964690c7ce1166cbc2a7bd08b1bb" -"checksum getopts 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)" = "65922871abd2f101a2eb0eaebadc66668e54a87ad9c3dd82520b5f86ede5eff9" -"checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" -"checksum iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "29d062ee61fccdf25be172e70f34c9f6efc597e1fb8f6526e8437b2046ab26be" -"checksum itertools 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ab4d6a273c31ef276c917019239588b23bc696f277af8db10742cba3c27ec2f0" +"checksum flate2 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "37847f133aae7acf82bb9577ccd8bda241df836787642654286e79679826a54b" +"checksum fnv 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" +"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" +"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +"checksum fuchsia-zircon 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +"checksum fuchsia-zircon-sys 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +"checksum futures 0.1.23 (registry+https://github.com/rust-lang/crates.io-index)" = "884dbe32a6ae4cd7da5c6db9b78114449df9953b8d490c9d7e1b51720b922c62" +"checksum idna 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" +"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae3088ea4baeceb0284ee9eea42f591226e6beaecf65373e41b38d95a1b8e7a1" -"checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" -"checksum kafka 0.6.2 (git+https://github.com/spicavigo/kafka-rust)" = "" +"checksum kafka 0.7.0 (git+https://github.com/spicavigo/kafka-rust)" = "" "checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -"checksum lazy_static 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "3b37545ab726dd833ec6420aaba8231c5b320814b9029ad585555d2a03e94fbf" -"checksum lazycell 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b585b7a6811fb03aa10e74b278a0f00f8dd9b45dc681f148bb29fa5cb61859b" -"checksum libc 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "d1419b2939a0bc44b77feb34661583c7546b532b192feab36249ab584b86856c" +"checksum lazy_static 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca488b89a5657b0a2ecd45b95609b3e848cf1755da332a0da46e2b2b1cb371a7" +"checksum lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ce12306c4739d86ee97c23139f3a34ddf0387bbf181bc7929d287025a8c3ef6b" +"checksum lazycell 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a6f08839bc70ef4a3fe1d566d5350f519c5912ea86be0df1740a7d247c7fc0ef" +"checksum libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)" = "76e3a3ef172f1a0b9a9ff0dd1491ae5e6c948b94479a3021819ba7d860c8645d" "checksum linked-hash-map 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7860ec297f7008ff7a1e3382d7f7e1dcd69efc94751a2284bafc3d013c2aa939" -"checksum log 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "880f77541efa6e5cc74e76910c9884d9859683118839d6a1dc3b11e63512565b" -"checksum magenta 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4bf0336886480e671965f794bc9b6fce88503563013d1bfb7a502c81fe3ac527" -"checksum magenta-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40d014c7011ac470ae28e2f76a02bfea4a8480f73e701353b49ad7a8d75f4699" -"checksum matches 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "100aabe6b8ff4e4a7e32c1c13523379802df0772b82466207ac25b013f193376" +"checksum log 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "e19e8d5c34a3e0e2223db8e060f9e8264aeeb5c5fc64a4ee9965c062211c024b" +"checksum log 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cba860f648db8e6f269df990180c2217f333472b4a6e901e97446858487971e2" +"checksum matches 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" +"checksum memchr 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "796fba70e76612589ed2ce7f45282f5af869e0fdd7cc6199fa1aa1f1d591ba9d" "checksum miniz-sys 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "609ce024854aeb19a0ef7567d348aaa5a746b32fb72e336df7fcc16869d7e2b4" -"checksum mio 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "dbd91d3bfbceb13897065e97b2ef177a09a438cb33612b2d371bf568819a9313" +"checksum mio 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)" = "4fcfcb32d63961fb6f367bfd5d21e4600b92cd310f71f9dca25acae196eb1560" +"checksum mio-more 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0063c5ac7d07a3f177ad237540ddf5d96b7c9a9882b337702c1994bfd844d3e0" +"checksum mio-uds 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "84c7b5caa3a118a6e34dbac36504503b1e8dc5835e833306b9d6af0e05929f79" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" -"checksum net2 0.2.31 (registry+https://github.com/rust-lang/crates.io-index)" = "3a80f842784ef6c9a958b68b7516bc7e35883c614004dd94959a4dca1b716c09" -"checksum num 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "a311b77ebdc5dd4cf6449d81e4135d9f0e3b153839ac90e648a8ef538f923525" -"checksum num-integer 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)" = "d1452e8b06e448a07f0e6ebb0bb1d92b8890eea63288c0b627331d53514d0fba" -"checksum num-iter 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)" = "7485fcc84f85b4ecd0ea527b14189281cf27d60e583ae65ebc9c088b13dffe01" -"checksum num-traits 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "99843c856d68d8b4313b03a17e33c4bb42ae8f6610ea81b28abe076ac721b9b0" -"checksum openssl 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "816914b22eb15671d62c73442a51978f311e911d6a6f6cbdafa6abce1b5038fc" -"checksum openssl-sys 0.9.19 (registry+https://github.com/rust-lang/crates.io-index)" = "1e4c63a7d559c1e5afa6d6a9e6fa34bbc5f800ffc9ae08b72c605420b0c4f5e8" -"checksum percent-encoding 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "de154f638187706bde41d9b4738748933d64e6b37bdbffc0b47a97d16a6ae356" -"checksum pkg-config 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3a8b4c6b8165cd1a1cd4b9b120978131389f64bdaf456435caa41e630edba903" -"checksum pulldown-cmark 0.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "378e941dbd392c101f2cb88097fa4d7167bc421d4b88de3ff7dbee503bc3233b" -"checksum quine-mc_cluskey 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "07589615d719a60c8dd8a4622e7946465dfef20d1a428f969e3443e7386d5f45" -"checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" -"checksum rand 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "eb250fd207a4729c976794d03db689c9be1d634ab5a1c9da9492a13d8fecbcdf" -"checksum redis 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "02a92e223490cc63d9230c4cdf132a48ce154ab1e063558e3841e219c2ea3f91" -"checksum redox_syscall 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)" = "8dde11f18c108289bef24469638a04dce49da56084f2d50618b226e47eb04509" +"checksum net2 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "42550d9fb7b6684a6d404d9fa7250c2eb2646df731d1c06afc06dcee9e1bcf88" +"checksum num-integer 0.1.39 (registry+https://github.com/rust-lang/crates.io-index)" = "e83d528d2677f0518c570baf2b7abdcf0cd2d248860b68507bdcb3e91d4c0cea" +"checksum num-traits 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)" = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" +"checksum num-traits 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "630de1ef5cc79d0cdd78b7e33b81f083cbfe90de0f4b2b2f07f905867c70e9fe" +"checksum openssl 0.9.24 (registry+https://github.com/rust-lang/crates.io-index)" = "a3605c298474a3aa69de92d21139fb5e2a81688d308262359d85cdd0d12a7985" +"checksum openssl-sys 0.9.35 (registry+https://github.com/rust-lang/crates.io-index)" = "912f301a749394e1025d9dcddef6106ddee9252620e6d0a0e5f8d0681de9b129" +"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +"checksum pkg-config 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)" = "104630aa1c83213cbc76db0703630fcb0421dac3585063be4ce9a8a2feeaa745" +"checksum rand 0.3.22 (registry+https://github.com/rust-lang/crates.io-index)" = "15a732abf9d20f0ad8eeb6f909bf6868722d9a06e1e50802b6a70351f40b4eb1" +"checksum rand 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8356f47b32624fef5b3301c1be97e5944ecdd595409cc5da11d05f211db6cfbd" +"checksum rand 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e464cd887e869cddcae8792a4ee31d23c7edd516700695608f5b98c67ee0131c" +"checksum rand_core 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "edecf0f94da5551fc9b492093e30b041a891657db7940ee221f9d2f66e82eef2" +"checksum redis 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2dde3e551c6f072b3c1feab259e2d85e5795dfb4a4e0dd1510f3a1269f3befcf" +"checksum redox_syscall 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "c214e91d3ecf43e9a4e41e578973adeb14b474f2bee858742d127af75a0112b1" +"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" "checksum ref_slice 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "825740057197b7d43025e7faf6477eaabc03434e153233da02d1f44602f71527" -"checksum regex-syntax 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ad890a5eef7953f55427c50575c680c42841653abd2b028b68cd223d157f62db" -"checksum rustc-demangle 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aee45432acc62f7b9a108cc054142dac51f979e69e71ddce7d6fc7adf29e817e" +"checksum rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "bcfe5b13211b4d78e5c2cadfebd7769197d95c639c35a50057eb4c05de811395" "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda" -"checksum semver 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537" -"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum serde 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" -"checksum serde 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "6a7046c9d4c6c522d10b2d098f9bebe2bef227e0e74044d8c1bfcf6b476af799" -"checksum serde_derive 1.0.15 (registry+https://github.com/rust-lang/crates.io-index)" = "1afcaae083fd1c46952a315062326bc9957f182358eb7da03b57ef1c688f7aa9" -"checksum serde_derive_internals 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bd381f6d01a6616cdba8530492d453b7761b456ba974e98768a18cad2cd76f58" "checksum serde_json 0.8.6 (registry+https://github.com/rust-lang/crates.io-index)" = "67f7d2e9edc3523a9c8ec8cd6ec481b3a27810aafee3e625d311febd3e656b4c" -"checksum serde_json 1.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "d243424e06f9f9c39e3cd36147470fd340db785825e367625f79298a6ac6b7ac" -"checksum sha1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc30b1e1e8c40c121ca33b86c23308a090d19974ef001b4bf6e61fd1a0fb095c" +"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" -"checksum snap 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5462fa5df3823f873b735ffa79ccd6a039315c6e84405d01dafbf495dc9a9fe2" -"checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" -"checksum syn 0.11.11 (registry+https://github.com/rust-lang/crates.io-index)" = "d3b891b9015c88c576343b9b3e41c2c11a51c219ef067b264bd9c8aa9b441dad" -"checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" -"checksum term_size 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2b6b55df3198cc93372e85dd2ed817f0e38ce8cc0f22eb32391bfad9c4bf209" -"checksum textwrap 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df8e08afc40ae3459e4838f303e465aa50d823df8d7f83ca88108f6d3afe7edd" -"checksum time 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "d5d788d3aa77bc0ef3e9621256885555368b47bd495c13dd2e7413c89f845520" +"checksum slab 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5f9776d6b986f77b35c6cf846c11ad986ff128fe0b2b63a3628e3755e8d3102d" +"checksum snap 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "174451758f7045084ae92070f18e5d8e5c53a716f4172a9c6b17ce03e7b82573" +"checksum strsim 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +"checksum termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "689a3bdfaab439fd92bc87df5c4c78417d3cbe537487274e9b0b2dce76e92096" +"checksum textwrap 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "307686869c93e71f94da64286f9a9524c0f308a9e1c87a583de8e9c9039ad3f6" +"checksum time 0.1.40 (registry+https://github.com/rust-lang/crates.io-index)" = "d825be0eb33fda1a7e68012d51e9c7f451dc1a69391e7fdc197060bb8c56667b" +"checksum tokio-codec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "881e9645b81c2ce95fcb799ded2c29ffb9f25ef5bef909089a420e5961dd8ccb" +"checksum tokio-executor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "424f0c87ecd66b863045d84e384cb7ce0ae384d8b065b9f0363d29c0d1b30b2f" +"checksum tokio-io 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "a5c9635ee806f26d302b8baa1e145689a280d8f5aa8d0552e7344808da54cc21" +"checksum tokio-reactor 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "8703a5762ff6913510dc64272c714c4389ffd8c4b3cf602879b8bd14ff06b604" +"checksum tokio-tcp 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5b4c329b47f071eb8a746040465fa751bd95e4716e98daef6a9b4e434c17d565" "checksum toml 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "736b60249cb25337bc196faa43ee12c705e426f3d55c214d73a4e7be06f92cb4" -"checksum toml 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "a7540f4ffc193e0d3c94121edb19b055670d369f77d5804db11ae053a45b6e7e" -"checksum twox-hash 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "475352206e7a290c5fccc27624a163e8d0d115f7bb60ca18a64fc9ce056d7435" +"checksum twox-hash 1.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "4f85be565a110ed72ed7048cf56570db04ce0a592c98aa59b7dacde3e5718750" "checksum unicode-bidi 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" -"checksum unicode-normalization 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "51ccda9ef9efa3f7ef5d91e8f9b83bbe6955f9bf86aec89d5cce2c874625920f" -"checksum unicode-width 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "bf3a113775714a22dcb774d8ea3655c53a32debae63a063acc00a91cc586245f" -"checksum unicode-xid 0.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f860d7d29cf02cb2f3f359fd35991af3d30bac52c57d265a3c461074cb4dc" -"checksum url 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "eeb819346883532a271eb626deb43c4a1bb4c4dd47c519bd78137c3e72a4fe27" -"checksum vcpkg 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9e0a7d8bed3178a8fb112199d466eeca9ed09a14ba8ad67718179b4fd5487d0b" -"checksum vec_map 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "887b5b631c2ad01628bbbaa7dd4c869f80d3186688f8d0b6f58774fbe324988c" +"checksum unicode-normalization 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "6a0180bc61fc5a987082bfa111f4cc95c4caff7f9799f3e46df09163a937aa25" +"checksum unicode-width 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "882386231c45df4700b275c7ff55b6f3698780a650026380e72dabe76fa46526" +"checksum unreachable 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +"checksum url 1.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2a321979c09843d272956e73700d12c4e7d3d92b2ee112b31548aef0d4efc5a6" +"checksum vcpkg 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "def296d3eb3b12371b2c7d0e83bfe1403e4db2d7a0bba324a12b21c4ee13143d" +"checksum vec_map 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "05c78687fb1a80548ae3250346c3db86a80a7cdd77bda190189f2d0a0987c81a" +"checksum version_check 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7716c242968ee87e5542f8021178248f267f295a5c4803beae8b8b7fd9bc6051" +"checksum void 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" "checksum winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +"checksum winapi 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "773ef9dcc5f24b7d850d0ff101e542ff24c3b090a9768e03ff889fdef41f00fd" "checksum winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" "checksum ws2_32-sys 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" diff --git a/Cargo.toml b/Cargo.toml index 9234200..c2f442b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,6 @@ build = "build.rs" [features] capnp-recompile = ["capnpc"] -cargo-clippy = ["clippy"] coroutines = ["coio"] default = ["kafka"] @@ -27,12 +26,8 @@ serde = "~0.8" serde_json = "~0.8" toml = "~0.2" -[dependencies.clippy] -git = "https://github.com/Manishearth/rust-clippy" -optional = true - [dependencies.coio] -git = "https://github.com/zonyitoo/coio-rs" +git = "https://github.com/jedisct1/coio-rs" optional = true [dependencies.kafka] diff --git a/rustfmt.toml b/rustfmt.toml deleted file mode 100644 index 1716f9b..0000000 --- a/rustfmt.toml +++ /dev/null @@ -1,11 +0,0 @@ -array_horizontal_layout_threshold = 10 -condense_wildcard_suffixes = true -error_on_line_overflow = false -normalize_comments = true -reorder_imported_names = true -reorder_imports = true -reorder_imports_in_group = true -take_source_hints = true -use_try_shorthand = true - - diff --git a/src/flowgger/config.rs b/src/flowgger/config.rs index 2742ad7..5e1d489 100644 --- a/src/flowgger/config.rs +++ b/src/flowgger/config.rs @@ -1,6 +1,6 @@ use std::fs::File; -use std::io::{Error, ErrorKind}; use std::io::prelude::*; +use std::io::{Error, ErrorKind}; use std::path::Path; use toml; diff --git a/src/flowgger/decoder/gelf_decoder.rs b/src/flowgger/decoder/gelf_decoder.rs index e4767c4..e713ffe 100644 --- a/src/flowgger/decoder/gelf_decoder.rs +++ b/src/flowgger/decoder/gelf_decoder.rs @@ -30,7 +30,7 @@ impl Decoder for GelfDecoder { Err(Syntax(ErrorCode::InvalidUnicodeCodePoint, ..)) => { de::from_str(&line.replace('\n', r"\n")) } - x @ _ => x, + x => x, }; let obj: Value = obj.or(Err("Invalid GELF input, unable to parse as a JSON object"))?; let obj = obj.as_object().ok_or("Empty GELF input")?; diff --git a/src/flowgger/decoder/ltsv_decoder.rs b/src/flowgger/decoder/ltsv_decoder.rs index 38dd7b7..9227ea9 100644 --- a/src/flowgger/decoder/ltsv_decoder.rs +++ b/src/flowgger/decoder/ltsv_decoder.rs @@ -132,9 +132,11 @@ impl Decoder for LTSVDecoder { }; ( final_name, - SDValue::Bool(value - .parse::() - .or(Err("Type error; boolean was expected"))?), + SDValue::Bool( + value + .parse::() + .or(Err("Type error; boolean was expected"))?, + ), ) } Some(&SDValueType::F64) => { @@ -146,9 +148,11 @@ impl Decoder for LTSVDecoder { }; ( final_name, - SDValue::F64(value - .parse::() - .or(Err("Type error; f64 was expected"))?), + SDValue::F64( + value + .parse::() + .or(Err("Type error; f64 was expected"))?, + ), ) } Some(&SDValueType::I64) => { @@ -160,9 +164,11 @@ impl Decoder for LTSVDecoder { }; ( final_name, - SDValue::I64(value - .parse::() - .or(Err("Type error; i64 was expected"))?), + SDValue::I64( + value + .parse::() + .or(Err("Type error; i64 was expected"))?, + ), ) } Some(&SDValueType::U64) => { @@ -174,9 +180,11 @@ impl Decoder for LTSVDecoder { }; ( final_name, - SDValue::U64(value - .parse::() - .or(Err("Type error; u64 was expected"))?), + SDValue::U64( + value + .parse::() + .or(Err("Type error; u64 was expected"))?, + ), ) } } diff --git a/src/flowgger/decoder/rfc5424_decoder.rs b/src/flowgger/decoder/rfc5424_decoder.rs index 7d8999b..e8925c0 100644 --- a/src/flowgger/decoder/rfc5424_decoder.rs +++ b/src/flowgger/decoder/rfc5424_decoder.rs @@ -184,11 +184,10 @@ fn parse_data(line: &str) -> Result<(Option, Option), &' in_value = false; let value = unescape_sd_value(&sd[value_start..i]); let pair = ( - "_".to_owned() - + name.expect( - "Name in structured data contains an invalid UTF-8 \ - sequence", - ), + "_".to_owned() + name.expect( + "Name in structured data contains an invalid UTF-8 \ + sequence", + ), SDValue::String(value), ); sd_res.pairs.push(pair); diff --git a/src/flowgger/encoder/capnp_encoder.rs b/src/flowgger/encoder/capnp_encoder.rs index 0274a52..ca633b4 100644 --- a/src/flowgger/encoder/capnp_encoder.rs +++ b/src/flowgger/encoder/capnp_encoder.rs @@ -25,8 +25,7 @@ impl CapnpEncoder { .expect("output.capnp_extra values must be strings") .to_owned(), ) - }) - .collect(), + }).collect(), }; CapnpEncoder { extra: extra } } @@ -75,12 +74,13 @@ fn build_record( root.set_full_msg(&full_msg); } if let Some(sd) = record.sd { - sd.sd_id - .as_ref() - .and_then(|sd_id| Some(root.set_sd_id(sd_id))); - let mut pairs = root.borrow().init_pairs(sd.pairs.len() as u32); + sd.sd_id.as_ref().and_then(|sd_id| { + root.set_sd_id(sd_id); + Some(()) + }); + let mut pairs = root.reborrow().init_pairs(sd.pairs.len() as u32); for (i, (name, value)) in sd.pairs.into_iter().enumerate() { - let mut pair = pairs.borrow().get(i as u32); + let mut pair = pairs.reborrow().get(i as u32); pair.set_key(&name); let mut v = pair.init_value(); match value { @@ -96,7 +96,7 @@ fn build_record( if !extra.is_empty() { let mut pairs = root.init_extra(extra.len() as u32); for (i, &(ref name, ref value)) in extra.into_iter().enumerate() { - let mut pair = pairs.borrow().get((i) as u32); + let mut pair = pairs.reborrow().get((i) as u32); pair.set_key(name); let mut v = pair.init_value(); v.set_string(value) diff --git a/src/flowgger/encoder/gelf_encoder.rs b/src/flowgger/encoder/gelf_encoder.rs index 9aabe40..e7dc381 100644 --- a/src/flowgger/encoder/gelf_encoder.rs +++ b/src/flowgger/encoder/gelf_encoder.rs @@ -25,8 +25,7 @@ impl GelfEncoder { .expect("output.gelf_extra values must be strings") .to_owned(), ) - }) - .collect(), + }).collect(), }; GelfEncoder { extra: extra } } @@ -40,8 +39,7 @@ impl Encoder for GelfEncoder { .insert( "short_message".to_owned(), Value::String(record.msg.unwrap_or_else(|| "-".to_owned())), - ) - .insert("timestamp".to_owned(), Value::F64(record.ts)); + ).insert("timestamp".to_owned(), Value::F64(record.ts)); if let Some(severity) = record.severity { map = map.insert("level".to_owned(), Value::U64(u64::from(severity))); } diff --git a/src/flowgger/encoder/ltsv_encoder.rs b/src/flowgger/encoder/ltsv_encoder.rs index 4a551ab..af3021e 100644 --- a/src/flowgger/encoder/ltsv_encoder.rs +++ b/src/flowgger/encoder/ltsv_encoder.rs @@ -22,8 +22,7 @@ impl LTSVEncoder { .expect("output.ltsv_extra values must be strings") .to_owned(), ) - }) - .collect(), + }).collect(), }; LTSVEncoder { extra: extra } } diff --git a/src/flowgger/input/redis_input.rs b/src/flowgger/input/redis_input.rs index 556c448..2870938 100644 --- a/src/flowgger/input/redis_input.rs +++ b/src/flowgger/input/redis_input.rs @@ -40,14 +40,12 @@ impl RedisInput { .map_or(DEFAULT_CONNECT, |x| { x.as_str() .expect("input.redis_connect must be an ip:port string") - }) - .to_owned(); + }).to_owned(); let queue_key = config .lookup("input.redis_queue_key") .map_or(DEFAULT_QUEUE_KEY, |x| { x.as_str().expect("input.redis_queue_key must be a string") - }) - .to_owned(); + }).to_owned(); let threads = config .lookup("input.redis_threads") .map_or(DEFAULT_THREADS, |x| { diff --git a/src/flowgger/input/stdin_input.rs b/src/flowgger/input/stdin_input.rs index 29baeca..296af62 100644 --- a/src/flowgger/input/stdin_input.rs +++ b/src/flowgger/input/stdin_input.rs @@ -24,8 +24,7 @@ impl StdinInput { .map_or(DEFAULT_FRAMING, |x| { x.as_str() .expect(r#"input.framing must be a string set to "line", "nul" or "syslen""#) - }) - .to_owned(); + }).to_owned(); let stdin_config = StdinConfig { framing: framing }; StdinInput { stdin_config: stdin_config, diff --git a/src/flowgger/input/tcp/mod.rs b/src/flowgger/input/tcp/mod.rs index 9ddfa0e..57fe786 100644 --- a/src/flowgger/input/tcp/mod.rs +++ b/src/flowgger/input/tcp/mod.rs @@ -38,8 +38,7 @@ pub fn config_parse(config: &Config) -> (TcpConfig, String, u64) { .lookup("input.listen") .map_or(DEFAULT_LISTEN, |x| { x.as_str().expect("input.listen must be an ip:port string") - }) - .to_owned(); + }).to_owned(); let threads = get_default_threads(config); let timeout = config.lookup("input.timeout").map_or(DEFAULT_TIMEOUT, |x| { x.as_integer() @@ -57,8 +56,7 @@ pub fn config_parse(config: &Config) -> (TcpConfig, String, u64) { .map_or(framing, |x| { x.as_str() .expect(r#"input.framing must be a string set to "line", "nul" or "syslen""#) - }) - .to_owned(); + }).to_owned(); let tcp_config = TcpConfig { framing: framing, threads: threads, diff --git a/src/flowgger/input/tcp/tcpco_input.rs b/src/flowgger/input/tcp/tcpco_input.rs index 119dcd3..d344d3e 100644 --- a/src/flowgger/input/tcp/tcpco_input.rs +++ b/src/flowgger/input/tcp/tcpco_input.rs @@ -1,6 +1,6 @@ use super::*; -use coio::Scheduler; use coio::net::{TcpListener, TcpStream}; +use coio::Scheduler; use flowgger::config::Config; use flowgger::decoder::Decoder; use flowgger::encoder::Encoder; @@ -51,8 +51,7 @@ impl Input for TcpCoInput { Err(_) => {} } } - }) - .unwrap(); + }).unwrap(); } } diff --git a/src/flowgger/input/tls/mod.rs b/src/flowgger/input/tls/mod.rs index 0edd001..ddecf04 100644 --- a/src/flowgger/input/tls/mod.rs +++ b/src/flowgger/input/tls/mod.rs @@ -42,9 +42,9 @@ pub struct TlsConfig { fn set_fs(ctx: &mut SslContextBuilder) { let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF4296D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C022E0B1EF4275BF7B6C5BFC11D45F9088B941F54EB1E59BB8BC39A0BF12307F5C4FDB70C581B23F76B63ACAE1CAA6B7902D52526735488A0EF13C6D9A51BFA4AB3AD8347796524D8EF6A167B5A41825D967E144E5140564251CCACB83E6B486F6B3CA3F7971506026C0B857F689962856DED4010ABD0BE621C3A3960A54E710C375F26375D7014103A4B54330C198AF126116D2276E11715F693877FAD7EF09CADB094AE91E1A1597").unwrap(); let g = BigNum::from_hex_str("3FB32C9B73134D0B2E77506660EDBD484CA7B18F21EF205407F4793A1A0BA12510DBC15077BE463FFF4FED4AAC0BB555BE3A6C1B0C6B47B1BC3773BF7E8C6F62901228F8C28CBB18A55AE31341000A650196F931C77A57F2DDF463E5E9EC144B777DE62AAAB8A8628AC376D282D6ED3864E67982428EBC831D14348F6F2F9193B5045AF2767164E1DFC967C1FB3F2E55A4BD1BFFE83B9C80D052B985D182EA0ADB2A3B7313D3FE14C8484B1E052588B9B7D2BBD2DF016199ECD06E1557CD0915B3353BBB64E0EC377FD028370DF92B52C7891428CDC67EB6184B523D1DB246C32F63078490F00EF8D647D148D47954515E2327CFEF98C582664B4C0F6CC41659").unwrap(); - let q = BigNum::from_hex_str( - "8CF83642A709A097B447997640129DA299B1A47D1EB3750BA308B0FE64F5FBD3", - ).unwrap(); + let q = + BigNum::from_hex_str("8CF83642A709A097B447997640129DA299B1A47D1EB3750BA308B0FE64F5FBD3") + .unwrap(); let dh = Dh::from_params(p, g, q).unwrap(); ctx.set_tmp_dh(&dh).unwrap(); } @@ -69,30 +69,26 @@ pub fn config_parse(config: &Config) -> (TlsConfig, String, u64) { .lookup("input.listen") .map_or(DEFAULT_LISTEN, |x| { x.as_str().expect("input.listen must be an ip:port string") - }) - .to_owned(); + }).to_owned(); let threads = get_default_threads(config); let cert = config .lookup("input.tls_cert") .map_or(DEFAULT_CERT, |x| { x.as_str() .expect("input.tls_cert must be a path to a .pem file") - }) - .to_owned(); + }).to_owned(); let key = config .lookup("input.tls_key") .map_or(DEFAULT_KEY, |x| { x.as_str() .expect("input.tls_key must be a path to a .pem file") - }) - .to_owned(); + }).to_owned(); let ciphers = config .lookup("input.tls_ciphers") .map_or(DEFAULT_CIPHERS, |x| { x.as_str() .expect("input.tls_ciphers must be a string with a cipher suite") - }) - .to_owned(); + }).to_owned(); let tls_modern = match config .lookup("input.tls_compatibility_level") @@ -100,8 +96,7 @@ pub fn config_parse(config: &Config) -> (TlsConfig, String, u64) { x.as_str().expect( "input.tls_compatibility_level must be a string with the comptibility level", ) - }) - .to_lowercase() + }).to_lowercase() .as_ref() { "default" | "any" | "intermediate" => false, @@ -141,15 +136,14 @@ pub fn config_parse(config: &Config) -> (TlsConfig, String, u64) { .map_or(framing, |x| { x.as_str() .expect(r#"input.framing must be a string set to "line", "nul" or "syslen""#) - }) - .to_owned(); + }).to_owned(); let mut acceptor_builder = (if tls_modern { SslAcceptorBuilder::mozilla_modern_raw(SslMethod::tls()) } else { SslAcceptorBuilder::mozilla_intermediate_raw(SslMethod::tls()) }).unwrap(); { - let mut ctx = acceptor_builder.builder_mut(); + let mut ctx = &mut acceptor_builder; if let Some(ca_file) = ca_file { ctx.set_ca_file(&ca_file) .expect("Unable to read the trusted CA file"); diff --git a/src/flowgger/input/tls/tlsco_input.rs b/src/flowgger/input/tls/tlsco_input.rs index af70dfd..ffcff48 100644 --- a/src/flowgger/input/tls/tlsco_input.rs +++ b/src/flowgger/input/tls/tlsco_input.rs @@ -1,11 +1,10 @@ use super::*; -use coio::Scheduler; use coio::net::{TcpListener, TcpStream}; +use coio::Scheduler; use flowgger::config::Config; use flowgger::decoder::Decoder; use flowgger::encoder::Encoder; use flowgger::splitter::{CapnpSplitter, LineSplitter, NulSplitter, Splitter, SyslenSplitter}; -use openssl::ssl::*; use std::io::{stderr, BufReader, Write}; use std::net::SocketAddr; use std::sync::mpsc::SyncSender; @@ -52,8 +51,7 @@ impl Input for TlsCoInput { Err(_) => {} } } - }) - .unwrap(); + }).unwrap(); } } @@ -67,7 +65,7 @@ fn handle_client( if let Ok(peer_addr) = client.peer_addr() { println!("Connection over TLS from [{}]", peer_addr); } - let sslclient = match SslStream::accept(&*tls_config.arc_ctx, client) { + let sslclient = match tls_config.acceptor.accept(client) { Err(_) => { let _ = writeln!(stderr(), "SSL handshake aborted by the client"); return; diff --git a/src/flowgger/input/udp_input.rs b/src/flowgger/input/udp_input.rs index 4fca1ed..c177956 100644 --- a/src/flowgger/input/udp_input.rs +++ b/src/flowgger/input/udp_input.rs @@ -1,5 +1,5 @@ use super::Input; -use flate2::FlateReadExt; +use flate2::read::{GzDecoder, ZlibDecoder}; use flowgger::config::Config; use flowgger::decoder::Decoder; use flowgger::encoder::Encoder; @@ -22,8 +22,7 @@ impl UdpInput { .lookup("input.listen") .map_or(DEFAULT_LISTEN, |x| { x.as_str().expect("input.listen must be an ip:port string") - }) - .to_owned(); + }).to_owned(); UdpInput { listen: listen } } } @@ -64,15 +63,13 @@ fn handle_record_maybe_compressed( && (line[0] == 0x78 && (line[1] == 0x01 || line[1] == 0x9c || line[1] == 0xda)) { let mut decompressed = Vec::with_capacity(MAX_UDP_PACKET_SIZE * MAX_COMPRESSION_RATIO); - match line.zlib_decode().read_to_end(&mut decompressed) { + match ZlibDecoder::new(line).read_to_end(&mut decompressed) { Ok(_) => handle_record(&decompressed, tx, decoder, encoder), Err(_) => Err("Corrupted compressed (zlib) record"), } } else if line.len() >= 24 && (line[0] == 0x1f && line[1] == 0x8b && line[2] == 0x08) { let mut decompressed = Vec::with_capacity(MAX_UDP_PACKET_SIZE * MAX_COMPRESSION_RATIO); - match line.gz_decode() - .and_then(|mut x| x.read_to_end(&mut decompressed)) - { + match GzDecoder::new(line).read_to_end(&mut decompressed) { Ok(_) => handle_record(&decompressed, tx, decoder, encoder), Err(_) => Err("Corrupted compressed (gzip) record"), } diff --git a/src/flowgger/mod.rs b/src/flowgger/mod.rs index 444b562..7155e8c 100644 --- a/src/flowgger/mod.rs +++ b/src/flowgger/mod.rs @@ -17,12 +17,12 @@ use self::input::{Input, RedisInput, StdinInput, TcpInput, TlsInput, UdpInput}; #[cfg(feature = "coroutines")] use self::input::{TcpCoInput, TlsCoInput}; use self::merger::{LineMerger, Merger, NulMerger, SyslenMerger}; -use self::output::{DebugOutput, Output, TlsOutput}; #[cfg(feature = "kafka")] use self::output::KafkaOutput; +use self::output::{DebugOutput, Output, TlsOutput}; use std::error::Error; -use std::sync::{Arc, Mutex}; use std::sync::mpsc::{sync_channel, Receiver, SyncSender}; +use std::sync::{Arc, Mutex}; const DEFAULT_INPUT_FORMAT: &'static str = "rfc5424"; const DEFAULT_INPUT_TYPE: &'static str = "syslog-tls"; diff --git a/src/flowgger/output/debug_output.rs b/src/flowgger/output/debug_output.rs index a38d9b3..194c53c 100644 --- a/src/flowgger/output/debug_output.rs +++ b/src/flowgger/output/debug_output.rs @@ -2,8 +2,8 @@ use super::Output; use flowgger::config::Config; use flowgger::merger::Merger; use std::io::{stdout, Write}; -use std::sync::{Arc, Mutex}; use std::sync::mpsc::Receiver; +use std::sync::{Arc, Mutex}; use std::thread; pub struct DebugOutput; @@ -20,19 +20,17 @@ impl Output for DebugOutput { Some(merger) => Some(merger.clone_boxed()), None => None, }; - thread::spawn(move || { - loop { - let mut bytes = match { arx.lock().unwrap().recv() } { - Ok(line) => line, - Err(_) => return, - }; - if let Some(ref merger) = merger { - merger.frame(&mut bytes); - } - let out = String::from_utf8_lossy(&bytes); - print!("{}", out); - let _ = stdout().flush(); + thread::spawn(move || loop { + let mut bytes = match { arx.lock().unwrap().recv() } { + Ok(line) => line, + Err(_) => return, + }; + if let Some(ref merger) = merger { + merger.frame(&mut bytes); } + let out = String::from_utf8_lossy(&bytes); + print!("{}", out); + let _ = stdout().flush(); }); } } diff --git a/src/flowgger/output/kafka_output.rs b/src/flowgger/output/kafka_output.rs index 2aeadbe..d25e85b 100644 --- a/src/flowgger/output/kafka_output.rs +++ b/src/flowgger/output/kafka_output.rs @@ -4,8 +4,8 @@ use flowgger::merger::Merger; use kafka::producer::{Compression, Producer, Record, RequiredAcks}; use std::io::{stderr, Write}; use std::process::exit; -use std::sync::{Arc, Mutex}; use std::sync::mpsc::Receiver; +use std::sync::{Arc, Mutex}; use std::thread; use std::time::Duration; @@ -71,7 +71,8 @@ impl<'a> KafkaWorker<'a> { Ok(line) => line, Err(_) => return, }; - match self.producer + match self + .producer .send(&Record::from_value(&self.config.topic, bytes)) { Ok(_) => {} @@ -139,8 +140,7 @@ impl KafkaOutput { x.as_str() .expect("output.kafka_brokers must be a list of strings") .to_owned() - }) - .collect(); + }).collect(); let topic = config .lookup("output.kafka_topic") .expect("output.kafka_topic must be a string") @@ -171,8 +171,7 @@ impl KafkaOutput { .map_or(KAFKA_DEFAULT_COMPRESSION, |x| { x.as_str() .expect("output.kafka_compresion must be a string") - }) - .to_lowercase() + }).to_lowercase() .as_ref() { "none" => Compression::NONE, diff --git a/src/flowgger/output/mod.rs b/src/flowgger/output/mod.rs index 30fb7bb..2aa40d0 100644 --- a/src/flowgger/output/mod.rs +++ b/src/flowgger/output/mod.rs @@ -9,8 +9,8 @@ pub use self::kafka_output::KafkaOutput; pub use self::tls_output::TlsOutput; use flowgger::merger::Merger; -use std::sync::{Arc, Mutex}; use std::sync::mpsc::Receiver; +use std::sync::{Arc, Mutex}; pub trait Output { fn start(&self, arx: Arc>>>, merger: Option>); diff --git a/src/flowgger/output/tls_output.rs b/src/flowgger/output/tls_output.rs index b5de625..1b7857a 100644 --- a/src/flowgger/output/tls_output.rs +++ b/src/flowgger/output/tls_output.rs @@ -7,15 +7,14 @@ use openssl::ssl::*; use openssl::x509::X509_FILETYPE_PEM; use rand; use rand::Rng; -use rand::distributions::{IndependentSample, Range}; use super::Output; use std::io; use std::io::{stderr, BufWriter, ErrorKind, Write}; use std::net::TcpStream; use std::path::{Path, PathBuf}; -use std::sync::{Arc, Mutex}; use std::sync::mpsc::Receiver; +use std::sync::{Arc, Mutex}; use std::thread; use std::time::Duration; @@ -167,9 +166,8 @@ impl TlsWorker { { recovery_delay = f64::from(tls_config.recovery_delay_init); } else if recovery_delay < f64::from(tls_config.recovery_delay_max) { - let between = Range::new(0.0, recovery_delay); let mut rng = rand::thread_rng(); - recovery_delay += between.ind_sample(&mut rng); + recovery_delay += rng.gen_range(0.0, recovery_delay); } thread::sleep(Duration::from_millis(recovery_delay.round() as u64)); let _ = writeln!(stderr(), "Attempting to reconnect"); @@ -178,14 +176,12 @@ impl TlsWorker { } fn new_tcp(connect_chosen: &str) -> Result { - loop { match TcpStream::connect(connect_chosen) { Ok(stream) => return Ok(stream), Err(e) => { return Err(e); } } - } } impl TlsOutput { @@ -218,9 +214,9 @@ impl Output for TlsOutput { fn set_fs(ctx: &mut SslContextBuilder) { let p = BigNum::from_hex_str("87A8E61DB4B6663CFFBBD19C651959998CEEF608660DD0F25D2CEED4435E3B00E00DF8F1D61957D4FAF7DF4561B2AA3016C3D91134096FAA3BF4296D830E9A7C209E0C6497517ABD5A8A9D306BCF67ED91F9E6725B4758C022E0B1EF4275BF7B6C5BFC11D45F9088B941F54EB1E59BB8BC39A0BF12307F5C4FDB70C581B23F76B63ACAE1CAA6B7902D52526735488A0EF13C6D9A51BFA4AB3AD8347796524D8EF6A167B5A41825D967E144E5140564251CCACB83E6B486F6B3CA3F7971506026C0B857F689962856DED4010ABD0BE621C3A3960A54E710C375F26375D7014103A4B54330C198AF126116D2276E11715F693877FAD7EF09CADB094AE91E1A1597").unwrap(); let g = BigNum::from_hex_str("3FB32C9B73134D0B2E77506660EDBD484CA7B18F21EF205407F4793A1A0BA12510DBC15077BE463FFF4FED4AAC0BB555BE3A6C1B0C6B47B1BC3773BF7E8C6F62901228F8C28CBB18A55AE31341000A650196F931C77A57F2DDF463E5E9EC144B777DE62AAAB8A8628AC376D282D6ED3864E67982428EBC831D14348F6F2F9193B5045AF2767164E1DFC967C1FB3F2E55A4BD1BFFE83B9C80D052B985D182EA0ADB2A3B7313D3FE14C8484B1E052588B9B7D2BBD2DF016199ECD06E1557CD0915B3353BBB64E0EC377FD028370DF92B52C7891428CDC67EB6184B523D1DB246C32F63078490F00EF8D647D148D47954515E2327CFEF98C582664B4C0F6CC41659").unwrap(); - let q = BigNum::from_hex_str( - "8CF83642A709A097B447997640129DA299B1A47D1EB3750BA308B0FE64F5FBD3", - ).unwrap(); + let q = + BigNum::from_hex_str("8CF83642A709A097B447997640129DA299B1A47D1EB3750BA308B0FE64F5FBD3") + .unwrap(); let dh = Dh::from_params(p, g, q).unwrap(); ctx.set_tmp_dh(&dh).unwrap(); } @@ -244,8 +240,7 @@ fn config_parse(config: &Config) -> (TlsConfig, u32) { x.as_str() .expect("output.connect must be a list of strings") .to_owned() - }) - .collect(); + }).collect(); let cert: Option = config.lookup("output.tls_cert").and_then(|x| { Some(PathBuf::from( x.as_str() @@ -263,8 +258,7 @@ fn config_parse(config: &Config) -> (TlsConfig, u32) { .map_or(DEFAULT_CIPHERS, |x| { x.as_str() .expect("output.tls_ciphers must be a string with a cipher suite") - }) - .to_owned(); + }).to_owned(); let verify_peer = config .lookup("output.tls_verify_peer") .map_or(DEFAULT_VERIFY_PEER, |x| { @@ -293,33 +287,36 @@ fn config_parse(config: &Config) -> (TlsConfig, u32) { .map_or(DEFAULT_ASYNC, |x| { x.as_bool().expect("output.tls_async must be a boolean") }); - let recovery_delay_init = config.lookup("output.tls_recovery_delay_init").map_or( - DEFAULT_RECOVERY_DELAY_INIT, - |x| { - x.as_integer() - .expect("output.tls_recovery_delay_init must be an integer") as u32 - }, - ); - let recovery_delay_max = config.lookup("output.tls_recovery_delay_max").map_or( - DEFAULT_RECOVERY_DELAY_MAX, - |x| { - x.as_integer() - .expect("output.tls_recovery_delay_max must be an integer") as u32 - }, - ); - let recovery_probe_time = config.lookup("output.tls_recovery_probe_time").map_or( - DEFAULT_RECOVERY_PROBE_TIME, - |x| { - x.as_integer() - .expect("output.tls_recovery_probe_time must be an integer") as u32 - }, - ); + let recovery_delay_init = + config + .lookup("output.tls_recovery_delay_init") + .map_or(DEFAULT_RECOVERY_DELAY_INIT, |x| { + x.as_integer() + .expect("output.tls_recovery_delay_init must be an integer") + as u32 + }); + let recovery_delay_max = + config + .lookup("output.tls_recovery_delay_max") + .map_or(DEFAULT_RECOVERY_DELAY_MAX, |x| { + x.as_integer() + .expect("output.tls_recovery_delay_max must be an integer") + as u32 + }); + let recovery_probe_time = + config + .lookup("output.tls_recovery_probe_time") + .map_or(DEFAULT_RECOVERY_PROBE_TIME, |x| { + x.as_integer() + .expect("output.tls_recovery_probe_time must be an integer") + as u32 + }); if recovery_delay_max < recovery_delay_init { panic!("output.tls_recovery_delay_max cannot be less than output.tls_recovery_delay_init"); } let mut connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap(); { - let mut ctx = connector_builder.builder_mut(); + let mut ctx = &mut connector_builder; if !verify_peer { ctx.set_verify(SSL_VERIFY_NONE); } else { diff --git a/src/flowgger/record_capnp.rs b/src/flowgger/record_capnp.rs index 565536e..95ff045 100644 --- a/src/flowgger/record_capnp.rs +++ b/src/flowgger/record_capnp.rs @@ -2,15 +2,8 @@ // DO NOT EDIT. // source: record.capnp - pub mod record { - #![allow(unused_imports)] - use capnp::{data, text, Result}; - use capnp::{data_list, enum_list, list_list, primitive_list, struct_list, text_list}; - use capnp::capability::{FromClientHook, FromTypelessPipeline}; - use capnp::private::layout; - use capnp::traits::{FromStructBuilder, FromStructReader}; - + #[derive(Copy, Clone)] pub struct Owned; impl<'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; @@ -26,7 +19,7 @@ pub mod record { #[derive(Clone, Copy)] pub struct Reader<'a> { - reader: layout::StructReader<'a>, + reader: ::capnp::private::layout::StructReader<'a>, } impl<'a> ::capnp::traits::HasTypeId for Reader<'a> { @@ -44,9 +37,10 @@ pub mod record { impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> { fn get_from_pointer( reader: &::capnp::private::layout::PointerReader<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructReader::new(reader - .get_struct(::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructReader::new( + reader.get_struct(::std::ptr::null())?, + )) } } @@ -58,11 +52,11 @@ pub mod record { } impl<'a> Reader<'a> { - pub fn borrow(&self) -> Reader { + pub fn reborrow<'b>(&'b self) -> Reader<'b> { Reader { ..*self } } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.reader.total_size() } #[inline] @@ -70,7 +64,7 @@ pub mod record { self.reader.get_data_field::(0) } #[inline] - pub fn get_hostname(self) -> Result> { + pub fn get_hostname(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(0) .get_text(::std::ptr::null(), 0) @@ -87,7 +81,7 @@ pub mod record { self.reader.get_data_field::(9) } #[inline] - pub fn get_appname(self) -> Result> { + pub fn get_appname(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(1) .get_text(::std::ptr::null(), 0) @@ -96,7 +90,7 @@ pub mod record { !self.reader.get_pointer_field(1).is_null() } #[inline] - pub fn get_procid(self) -> Result> { + pub fn get_procid(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(2) .get_text(::std::ptr::null(), 0) @@ -105,7 +99,7 @@ pub mod record { !self.reader.get_pointer_field(2).is_null() } #[inline] - pub fn get_msgid(self) -> Result> { + pub fn get_msgid(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(3) .get_text(::std::ptr::null(), 0) @@ -114,7 +108,7 @@ pub mod record { !self.reader.get_pointer_field(3).is_null() } #[inline] - pub fn get_msg(self) -> Result> { + pub fn get_msg(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(4) .get_text(::std::ptr::null(), 0) @@ -123,7 +117,7 @@ pub mod record { !self.reader.get_pointer_field(4).is_null() } #[inline] - pub fn get_full_msg(self) -> Result> { + pub fn get_full_msg(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(5) .get_text(::std::ptr::null(), 0) @@ -132,7 +126,7 @@ pub mod record { !self.reader.get_pointer_field(5).is_null() } #[inline] - pub fn get_sd_id(self) -> Result> { + pub fn get_sd_id(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(6) .get_text(::std::ptr::null(), 0) @@ -141,14 +135,20 @@ pub mod record { !self.reader.get_pointer_field(6).is_null() } #[inline] - pub fn get_pairs(self) -> Result> { + pub fn get_pairs( + self, + ) -> ::capnp::Result<::capnp::struct_list::Reader<'a, ::record_capnp::pair::Owned>> + { ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(7)) } pub fn has_pairs(&self) -> bool { !self.reader.get_pointer_field(7).is_null() } #[inline] - pub fn get_extra(self) -> Result> { + pub fn get_extra( + self, + ) -> ::capnp::Result<::capnp::struct_list::Reader<'a, ::record_capnp::pair::Owned>> + { ::capnp::traits::FromPointerReader::get_from_pointer(&self.reader.get_pointer_field(8)) } pub fn has_extra(&self) -> bool { @@ -161,7 +161,7 @@ pub mod record { } impl<'a> ::capnp::traits::HasStructSize for Builder<'a> { #[inline] - fn struct_size() -> layout::StructSize { + fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE } } @@ -193,9 +193,10 @@ pub mod record { } fn get_from_pointer( builder: ::capnp::private::layout::PointerBuilder<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder - .get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new( + builder.get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?, + )) } } @@ -203,23 +204,24 @@ pub mod record { fn set_pointer_builder<'b>( pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a>, - ) -> Result<()> { - pointer.set_struct(&value.reader) + canonicalize: bool, + ) -> ::capnp::Result<()> { + pointer.set_struct(&value.reader, canonicalize) } } impl<'a> Builder<'a> { - pub fn as_reader(&self) -> Reader<'a> { + pub fn as_reader(self) -> Reader<'a> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn borrow(&mut self) -> Builder { + pub fn reborrow<'b>(&'b mut self) -> Builder<'b> { Builder { ..*self } } - pub fn borrow_as_reader(&self) -> Reader { + pub fn reborrow_as_reader<'b>(&'b self) -> Reader<'b> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.builder.as_reader().total_size() } #[inline] @@ -231,17 +233,17 @@ pub mod record { self.builder.set_data_field::(0, value); } #[inline] - pub fn get_hostname(self) -> Result> { + pub fn get_hostname(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(0) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_hostname(&mut self, value: text::Reader) { + pub fn set_hostname(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(0).set_text(value); } #[inline] - pub fn init_hostname(self, size: u32) -> text::Builder<'a> { + pub fn init_hostname(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(0).init_text(size) } pub fn has_hostname(&self) -> bool { @@ -264,126 +266,130 @@ pub mod record { self.builder.set_data_field::(9, value); } #[inline] - pub fn get_appname(self) -> Result> { + pub fn get_appname(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(1) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_appname(&mut self, value: text::Reader) { + pub fn set_appname(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(1).set_text(value); } #[inline] - pub fn init_appname(self, size: u32) -> text::Builder<'a> { + pub fn init_appname(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(1).init_text(size) } pub fn has_appname(&self) -> bool { !self.builder.get_pointer_field(1).is_null() } #[inline] - pub fn get_procid(self) -> Result> { + pub fn get_procid(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(2) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_procid(&mut self, value: text::Reader) { + pub fn set_procid(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(2).set_text(value); } #[inline] - pub fn init_procid(self, size: u32) -> text::Builder<'a> { + pub fn init_procid(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(2).init_text(size) } pub fn has_procid(&self) -> bool { !self.builder.get_pointer_field(2).is_null() } #[inline] - pub fn get_msgid(self) -> Result> { + pub fn get_msgid(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(3) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_msgid(&mut self, value: text::Reader) { + pub fn set_msgid(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(3).set_text(value); } #[inline] - pub fn init_msgid(self, size: u32) -> text::Builder<'a> { + pub fn init_msgid(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(3).init_text(size) } pub fn has_msgid(&self) -> bool { !self.builder.get_pointer_field(3).is_null() } #[inline] - pub fn get_msg(self) -> Result> { + pub fn get_msg(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(4) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_msg(&mut self, value: text::Reader) { + pub fn set_msg(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(4).set_text(value); } #[inline] - pub fn init_msg(self, size: u32) -> text::Builder<'a> { + pub fn init_msg(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(4).init_text(size) } pub fn has_msg(&self) -> bool { !self.builder.get_pointer_field(4).is_null() } #[inline] - pub fn get_full_msg(self) -> Result> { + pub fn get_full_msg(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(5) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_full_msg(&mut self, value: text::Reader) { + pub fn set_full_msg(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(5).set_text(value); } #[inline] - pub fn init_full_msg(self, size: u32) -> text::Builder<'a> { + pub fn init_full_msg(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(5).init_text(size) } pub fn has_full_msg(&self) -> bool { !self.builder.get_pointer_field(5).is_null() } #[inline] - pub fn get_sd_id(self) -> Result> { + pub fn get_sd_id(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(6) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_sd_id(&mut self, value: text::Reader) { + pub fn set_sd_id(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(6).set_text(value); } #[inline] - pub fn init_sd_id(self, size: u32) -> text::Builder<'a> { + pub fn init_sd_id(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(6).init_text(size) } pub fn has_sd_id(&self) -> bool { !self.builder.get_pointer_field(6).is_null() } #[inline] - pub fn get_pairs(self) -> Result> { + pub fn get_pairs( + self, + ) -> ::capnp::Result<::capnp::struct_list::Builder<'a, ::record_capnp::pair::Owned>> + { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(7)) } #[inline] pub fn set_pairs( &mut self, - value: struct_list::Reader<'a, ::record_capnp::pair::Owned>, - ) -> Result<()> { + value: ::capnp::struct_list::Reader<'a, ::record_capnp::pair::Owned>, + ) -> ::capnp::Result<()> { ::capnp::traits::SetPointerBuilder::set_pointer_builder( self.builder.get_pointer_field(7), value, + false, ) } #[inline] pub fn init_pairs( self, size: u32, - ) -> struct_list::Builder<'a, ::record_capnp::pair::Owned> { + ) -> ::capnp::struct_list::Builder<'a, ::record_capnp::pair::Owned> { ::capnp::traits::FromPointerBuilder::init_pointer( self.builder.get_pointer_field(7), size, @@ -393,24 +399,28 @@ pub mod record { !self.builder.get_pointer_field(7).is_null() } #[inline] - pub fn get_extra(self) -> Result> { + pub fn get_extra( + self, + ) -> ::capnp::Result<::capnp::struct_list::Builder<'a, ::record_capnp::pair::Owned>> + { ::capnp::traits::FromPointerBuilder::get_from_pointer(self.builder.get_pointer_field(8)) } #[inline] pub fn set_extra( &mut self, - value: struct_list::Reader<'a, ::record_capnp::pair::Owned>, - ) -> Result<()> { + value: ::capnp::struct_list::Reader<'a, ::record_capnp::pair::Owned>, + ) -> ::capnp::Result<()> { ::capnp::traits::SetPointerBuilder::set_pointer_builder( self.builder.get_pointer_field(8), value, + false, ) } #[inline] pub fn init_extra( self, size: u32, - ) -> struct_list::Builder<'a, ::record_capnp::pair::Owned> { + ) -> ::capnp::struct_list::Builder<'a, ::record_capnp::pair::Owned> { ::capnp::traits::FromPointerBuilder::init_pointer( self.builder.get_pointer_field(8), size, @@ -424,7 +434,7 @@ pub mod record { pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline, } - impl FromTypelessPipeline for Pipeline { + impl ::capnp::capability::FromTypelessPipeline for Pipeline { fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline { Pipeline { _typeless: typeless, @@ -438,18 +448,12 @@ pub mod record { data: 2, pointers: 9, }; - pub const TYPE_ID: u64 = 0xe106_8a6a_ee02_baba; + pub const TYPE_ID: u64 = 0xe1068a6aee02baba; } } pub mod pair { - #![allow(unused_imports)] - use capnp::{data, text, Result}; - use capnp::{data_list, enum_list, list_list, primitive_list, struct_list, text_list}; - use capnp::capability::{FromClientHook, FromTypelessPipeline}; - use capnp::private::layout; - use capnp::traits::{FromStructBuilder, FromStructReader}; - + #[derive(Copy, Clone)] pub struct Owned; impl<'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; @@ -465,7 +469,7 @@ pub mod pair { #[derive(Clone, Copy)] pub struct Reader<'a> { - reader: layout::StructReader<'a>, + reader: ::capnp::private::layout::StructReader<'a>, } impl<'a> ::capnp::traits::HasTypeId for Reader<'a> { @@ -483,9 +487,10 @@ pub mod pair { impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> { fn get_from_pointer( reader: &::capnp::private::layout::PointerReader<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructReader::new(reader - .get_struct(::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructReader::new( + reader.get_struct(::std::ptr::null())?, + )) } } @@ -497,15 +502,15 @@ pub mod pair { } impl<'a> Reader<'a> { - pub fn borrow(&self) -> Reader { + pub fn reborrow<'b>(&'b self) -> Reader<'b> { Reader { ..*self } } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.reader.total_size() } #[inline] - pub fn get_key(self) -> Result> { + pub fn get_key(self) -> ::capnp::Result<::capnp::text::Reader<'a>> { self.reader .get_pointer_field(0) .get_text(::std::ptr::null(), 0) @@ -524,7 +529,7 @@ pub mod pair { } impl<'a> ::capnp::traits::HasStructSize for Builder<'a> { #[inline] - fn struct_size() -> layout::StructSize { + fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE } } @@ -556,9 +561,10 @@ pub mod pair { } fn get_from_pointer( builder: ::capnp::private::layout::PointerBuilder<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder - .get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new( + builder.get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?, + )) } } @@ -566,37 +572,38 @@ pub mod pair { fn set_pointer_builder<'b>( pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a>, - ) -> Result<()> { - pointer.set_struct(&value.reader) + canonicalize: bool, + ) -> ::capnp::Result<()> { + pointer.set_struct(&value.reader, canonicalize) } } impl<'a> Builder<'a> { - pub fn as_reader(&self) -> Reader<'a> { + pub fn as_reader(self) -> Reader<'a> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn borrow(&mut self) -> Builder { + pub fn reborrow<'b>(&'b mut self) -> Builder<'b> { Builder { ..*self } } - pub fn borrow_as_reader(&self) -> Reader { + pub fn reborrow_as_reader<'b>(&'b self) -> Reader<'b> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.builder.as_reader().total_size() } #[inline] - pub fn get_key(self) -> Result> { + pub fn get_key(self) -> ::capnp::Result<::capnp::text::Builder<'a>> { self.builder .get_pointer_field(0) .get_text(::std::ptr::null(), 0) } #[inline] - pub fn set_key(&mut self, value: text::Reader) { + pub fn set_key(&mut self, value: ::capnp::text::Reader) { self.builder.get_pointer_field(0).set_text(value); } #[inline] - pub fn init_key(self, size: u32) -> text::Builder<'a> { + pub fn init_key(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.get_pointer_field(0).init_text(size) } pub fn has_key(&self) -> bool { @@ -611,9 +618,9 @@ pub mod pair { self.builder.set_data_field::(0, 0); self.builder.get_pointer_field(1).clear(); self.builder.set_bool_field(16, false); - self.builder.set_data_field::(1, 0f64); - self.builder.set_data_field::(1, 0i64); - self.builder.set_data_field::(1, 0u64); + self.builder.set_data_field::(1, 0u8 as f64); + self.builder.set_data_field::(1, 0u8 as i64); + self.builder.set_data_field::(1, 0u8 as u64); ::capnp::traits::FromStructBuilder::new(self.builder) } } @@ -621,7 +628,7 @@ pub mod pair { pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline, } - impl FromTypelessPipeline for Pipeline { + impl ::capnp::capability::FromTypelessPipeline for Pipeline { fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline { Pipeline { _typeless: typeless, @@ -630,7 +637,7 @@ pub mod pair { } impl Pipeline { pub fn get_value(&self) -> ::record_capnp::pair::value::Pipeline { - FromTypelessPipeline::new(self._typeless.noop()) + ::capnp::capability::FromTypelessPipeline::new(self._typeless.noop()) } } mod _private { @@ -639,19 +646,13 @@ pub mod pair { data: 2, pointers: 2, }; - pub const TYPE_ID: u64 = 0xb4a6_8d38_a716_233d; + pub const TYPE_ID: u64 = 0xb4a68d38a716233d; } pub mod value { - #![allow(unused_imports)] - use capnp::{data, text, Result}; - use capnp::{data_list, enum_list, list_list, primitive_list, struct_list, text_list}; - use capnp::capability::{FromClientHook, FromTypelessPipeline}; - use capnp::private::layout; - use capnp::traits::{FromStructBuilder, FromStructReader}; - - pub use self::Which::{Bool, F64, I64, Null, String, U64}; + pub use self::Which::{Bool, Null, String, F64, I64, U64}; + #[derive(Copy, Clone)] pub struct Owned; impl<'a> ::capnp::traits::Owned<'a> for Owned { type Reader = Reader<'a>; @@ -667,7 +668,7 @@ pub mod pair { #[derive(Clone, Copy)] pub struct Reader<'a> { - reader: layout::StructReader<'a>, + reader: ::capnp::private::layout::StructReader<'a>, } impl<'a> ::capnp::traits::HasTypeId for Reader<'a> { @@ -685,9 +686,10 @@ pub mod pair { impl<'a> ::capnp::traits::FromPointerReader<'a> for Reader<'a> { fn get_from_pointer( reader: &::capnp::private::layout::PointerReader<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructReader::new(reader - .get_struct(::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructReader::new( + reader.get_struct(::std::ptr::null())?, + )) } } @@ -699,11 +701,11 @@ pub mod pair { } impl<'a> Reader<'a> { - pub fn borrow(&self) -> Reader { + pub fn reborrow<'b>(&'b self) -> Reader<'b> { Reader { ..*self } } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.reader.total_size() } pub fn has_string(&self) -> bool { @@ -715,17 +717,29 @@ pub mod pair { #[inline] pub fn which(self) -> ::std::result::Result, ::capnp::NotInSchema> { match self.reader.get_data_field::(0) { - 0 => ::std::result::Result::Ok(String( - self.reader - .get_pointer_field(1) - .get_text(::std::ptr::null(), 0), - )), - 1 => ::std::result::Result::Ok(Bool(self.reader.get_bool_field(16))), - 2 => ::std::result::Result::Ok(F64(self.reader.get_data_field::(1))), - 3 => ::std::result::Result::Ok(I64(self.reader.get_data_field::(1))), - 4 => ::std::result::Result::Ok(U64(self.reader.get_data_field::(1))), - 5 => ::std::result::Result::Ok(Null(())), - x => ::std::result::Result::Err(::capnp::NotInSchema(x)), + 0 => { + return ::std::result::Result::Ok(String( + self.reader + .get_pointer_field(1) + .get_text(::std::ptr::null(), 0), + )); + } + 1 => { + return ::std::result::Result::Ok(Bool(self.reader.get_bool_field(16))); + } + 2 => { + return ::std::result::Result::Ok(F64(self.reader.get_data_field::(1))); + } + 3 => { + return ::std::result::Result::Ok(I64(self.reader.get_data_field::(1))); + } + 4 => { + return ::std::result::Result::Ok(U64(self.reader.get_data_field::(1))); + } + 5 => { + return ::std::result::Result::Ok(Null(())); + } + x => return ::std::result::Result::Err(::capnp::NotInSchema(x)), } } } @@ -735,7 +749,7 @@ pub mod pair { } impl<'a> ::capnp::traits::HasStructSize for Builder<'a> { #[inline] - fn struct_size() -> layout::StructSize { + fn struct_size() -> ::capnp::private::layout::StructSize { _private::STRUCT_SIZE } } @@ -767,9 +781,10 @@ pub mod pair { } fn get_from_pointer( builder: ::capnp::private::layout::PointerBuilder<'a>, - ) -> Result> { - ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new(builder - .get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?)) + ) -> ::capnp::Result> { + ::std::result::Result::Ok(::capnp::traits::FromStructBuilder::new( + builder.get_struct(_private::STRUCT_SIZE, ::std::ptr::null())?, + )) } } @@ -777,32 +792,33 @@ pub mod pair { fn set_pointer_builder<'b>( pointer: ::capnp::private::layout::PointerBuilder<'b>, value: Reader<'a>, - ) -> Result<()> { - pointer.set_struct(&value.reader) + canonicalize: bool, + ) -> ::capnp::Result<()> { + pointer.set_struct(&value.reader, canonicalize) } } impl<'a> Builder<'a> { - pub fn as_reader(&self) -> Reader<'a> { + pub fn as_reader(self) -> Reader<'a> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn borrow(&mut self) -> Builder { + pub fn reborrow<'b>(&'b mut self) -> Builder<'b> { Builder { ..*self } } - pub fn borrow_as_reader(&self) -> Reader { + pub fn reborrow_as_reader<'b>(&'b self) -> Reader<'b> { ::capnp::traits::FromStructReader::new(self.builder.as_reader()) } - pub fn total_size(&self) -> Result<::capnp::MessageSize> { + pub fn total_size(&self) -> ::capnp::Result<::capnp::MessageSize> { self.builder.as_reader().total_size() } #[inline] - pub fn set_string(&mut self, value: text::Reader) { + pub fn set_string(&mut self, value: ::capnp::text::Reader) { self.builder.set_data_field::(0, 0); self.builder.get_pointer_field(1).set_text(value); } #[inline] - pub fn init_string(self, size: u32) -> text::Builder<'a> { + pub fn init_string(self, size: u32) -> ::capnp::text::Builder<'a> { self.builder.set_data_field::(0, 0); self.builder.get_pointer_field(1).init_text(size) } @@ -839,17 +855,35 @@ pub mod pair { #[inline] pub fn which(self) -> ::std::result::Result, ::capnp::NotInSchema> { match self.builder.get_data_field::(0) { - 0 => ::std::result::Result::Ok(String( - self.builder - .get_pointer_field(1) - .get_text(::std::ptr::null(), 0), - )), - 1 => ::std::result::Result::Ok(Bool(self.builder.get_bool_field(16))), - 2 => ::std::result::Result::Ok(F64(self.builder.get_data_field::(1))), - 3 => ::std::result::Result::Ok(I64(self.builder.get_data_field::(1))), - 4 => ::std::result::Result::Ok(U64(self.builder.get_data_field::(1))), - 5 => ::std::result::Result::Ok(Null(())), - x => ::std::result::Result::Err(::capnp::NotInSchema(x)), + 0 => { + return ::std::result::Result::Ok(String( + self.builder + .get_pointer_field(1) + .get_text(::std::ptr::null(), 0), + )); + } + 1 => { + return ::std::result::Result::Ok(Bool(self.builder.get_bool_field(16))); + } + 2 => { + return ::std::result::Result::Ok(F64(self + .builder + .get_data_field::(1))); + } + 3 => { + return ::std::result::Result::Ok(I64(self + .builder + .get_data_field::(1))); + } + 4 => { + return ::std::result::Result::Ok(U64(self + .builder + .get_data_field::(1))); + } + 5 => { + return ::std::result::Result::Ok(Null(())); + } + x => return ::std::result::Result::Err(::capnp::NotInSchema(x)), } } } @@ -857,7 +891,7 @@ pub mod pair { pub struct Pipeline { _typeless: ::capnp::any_pointer::Pipeline, } - impl FromTypelessPipeline for Pipeline { + impl ::capnp::capability::FromTypelessPipeline for Pipeline { fn new(typeless: ::capnp::any_pointer::Pipeline) -> Pipeline { Pipeline { _typeless: typeless, @@ -871,7 +905,7 @@ pub mod pair { data: 2, pointers: 2, }; - pub const TYPE_ID: u64 = 0x8a99_4a2a_ad4d_9204; + pub const TYPE_ID: u64 = 0x8a994a2aad4d9204; } pub enum Which { String(A0), @@ -881,7 +915,7 @@ pub mod pair { U64(u64), Null(()), } - pub type WhichReader<'a> = Which>>; - pub type WhichBuilder<'a> = Which>>; + pub type WhichReader<'a> = Which<::capnp::Result<::capnp::text::Reader<'a>>>; + pub type WhichBuilder<'a> = Which<::capnp::Result<::capnp::text::Builder<'a>>>; } } diff --git a/src/flowgger/splitter/mod.rs b/src/flowgger/splitter/mod.rs index d9d3f5b..15875e7 100644 --- a/src/flowgger/splitter/mod.rs +++ b/src/flowgger/splitter/mod.rs @@ -1,6 +1,6 @@ mod capnp_splitter; -mod nul_splitter; mod line_splitter; +mod nul_splitter; mod syslen_splitter; pub use self::capnp_splitter::CapnpSplitter; diff --git a/src/main.rs b/src/main.rs index 5e6a31d..fdb1386 100644 --- a/src/main.rs +++ b/src/main.rs @@ -30,8 +30,7 @@ fn main() { .help("Configuration file") .value_name("FILE") .index(1), - ) - .get_matches(); + ).get_matches(); let config_file = matches .value_of("config_file") .unwrap_or(DEFAULT_CONFIG_FILE);