diff --git a/Cargo.lock b/Cargo.lock index 79813f1041d..93b03a5693f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -173,7 +173,6 @@ dependencies = [ "htmlescape 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.10 (registry+https://github.com/rust-lang/crates.io-index)", "hyper-tls 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)", "jemalloc-ctl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -556,11 +555,6 @@ name = "dtoa" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "either" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "email" version = "0.0.19" @@ -936,14 +930,6 @@ dependencies = [ "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "itertools" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "either 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "itoa" version = "0.3.4" @@ -2608,7 +2594,6 @@ dependencies = [ "checksum docopt 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3b5b93718f8b3e5544fcc914c43de828ca6c6ace23e0332c6080a2977b49787a" "checksum dotenv 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a70de3c590ce18df70743cace1cf12565637a0b26fd8b04ef10c7d33fdc66cdc" "checksum dtoa 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "09c3753c3db574d215cba4ea76018483895d7bff25a31b49ba45db21c48e50ab" -"checksum either 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e311a7479512fbdf858fb54d91ec59f3b9f85bc0113659f46bba12b199d273ce" "checksum email 0.0.19 (git+https://github.com/lettre/rust-email)" = "" "checksum encoding 0.2.33 (registry+https://github.com/rust-lang/crates.io-index)" = "6b0d943856b990d12d3b55b359144ff341533e516d94098b1d3fc1ac666d36ec" "checksum encoding-index-japanese 1.20141219.5 (registry+https://github.com/rust-lang/crates.io-index)" = "04e8b2ff42e9a05335dbf8b5c6f7567e5591d0d916ccef4e0b1710d32a0d0c91" @@ -2651,7 +2636,6 @@ dependencies = [ "checksum idna 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "014b298351066f1512874135335d62a789ffe78a9974f94b43ed5621951eaf7d" "checksum indexmap 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "08173ba1e906efb6538785a8844dd496f5d34f0a2d88038e95195172fc667220" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" -"checksum itertools 0.7.11 (registry+https://github.com/rust-lang/crates.io-index)" = "0d47946d458e94a1b7bcabbf6521ea7c037062c81f534615abcad76e84d4970d" "checksum itoa 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "8324a32baf01e2ae060e9de58ed0bc2320c9a2833491ee36cd3b4c414de4db8c" "checksum itoa 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "1306f3464951f30e30d12373d31c79fbd52d236e5e896fd92f96ec7babbbe60b" "checksum jemalloc-ctl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4e93b0f37e7d735c6b610176d5b1bde8e1621ff3f6f7ac23cdfa4e7f7d0111b5" diff --git a/Cargo.toml b/Cargo.toml index 86b45064a5b..e9ec9880ce3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,6 @@ chrono = { version = "0.4.0", features = ["serde"] } comrak = { version = "0.2.3", default-features = false } ammonia = "1.0.0" docopt = "0.8.1" -itertools = "0.7.0" scheduled-thread-pool = "0.2.0" derive_deref = "1.0.0" reqwest = "0.9.1" diff --git a/src/bin/render-readmes.rs b/src/bin/render-readmes.rs index 66238804a38..ea636401a33 100644 --- a/src/bin/render-readmes.rs +++ b/src/bin/render-readmes.rs @@ -21,7 +21,6 @@ use chrono::{TimeZone, Utc}; use diesel::{dsl::any, prelude::*}; use docopt::Docopt; use flate2::read::GzDecoder; -use itertools::Itertools; use tar::{self, Archive}; const DEFAULT_PAGE_SIZE: usize = 25; @@ -95,23 +94,16 @@ fn main() { total_pages + 1 }; - for (page_num, version_ids_chunk) in version_ids - .into_iter() - .chunks(page_size) - .into_iter() - .enumerate() - { + for (page_num, version_ids_chunk) in version_ids.chunks(page_size).enumerate() { println!( "= Page {} of {} ==================================", page_num + 1, total_pages ); - let ids: Vec<_> = version_ids_chunk.collect(); - let versions = versions::table .inner_join(crates::table) - .filter(versions::id.eq(any(ids))) + .filter(versions::id.eq(any(version_ids_chunk))) .select((versions::all_columns, crates::name)) .load::<(Version, String)>(&conn) .expect("error loading versions");