From 43124ff7fbeacdc3203d2a4575f7505c30e370a1 Mon Sep 17 00:00:00 2001 From: lqd Date: Fri, 19 Apr 2019 16:14:21 +0200 Subject: [PATCH 1/5] Update lockfile to the latest polonius-engine release --- Cargo.lock | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3634ffa5655..aa4c217a88b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,3 +1,5 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. [[package]] name = "aho-corasick" version = "0.6.9" @@ -420,7 +422,7 @@ dependencies = [ "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "polonius-engine 0.6.2", + "polonius-engine 0.7.0", "polonius-parser 0.2.0", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -428,7 +430,7 @@ dependencies = [ [[package]] name = "polonius-engine" -version = "0.6.2" +version = "0.7.0" dependencies = [ "datafrog 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", From 6948f4ad2e9a7a72fac45017ea8f00d4565ab31a Mon Sep 17 00:00:00 2001 From: lqd Date: Fri, 19 Apr 2019 16:23:18 +0200 Subject: [PATCH 2/5] Remove datafrog from the main crate's dependencies The `polonius` crate doesn't use `datafrog ` directly, `polonius-engine` does. --- Cargo.lock | 1 - Cargo.toml | 1 - src/lib.rs | 1 - 3 files changed, 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aa4c217a88b..d923bd5ad33 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -417,7 +417,6 @@ version = "0.3.0" dependencies = [ "assert_cli 0.6.3 (registry+https://github.com/rust-lang/crates.io-index)", "clap 2.32.0 (registry+https://github.com/rust-lang/crates.io-index)", - "datafrog 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index 27dd630aee7..dfc0b51794e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,6 @@ diff = "0.1.0" [dependencies] log = "0.4" env_logger = "0.5" -datafrog = "2.0.0" failure = "0.1.1" rustc-hash = "1.0.0" structopt = "0.2.8" diff --git a/src/lib.rs b/src/lib.rs index 4f0ab77815b..86e4acf1bb5 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] extern crate clap; -extern crate datafrog; extern crate failure; extern crate polonius_engine; extern crate polonius_parser; From 92f38e2efb93e7ffc29093404620527feb502fac Mon Sep 17 00:00:00 2001 From: lqd Date: Fri, 19 Apr 2019 16:26:36 +0200 Subject: [PATCH 3/5] Remove dead code --- src/dump.rs | 5 ----- src/lib.rs | 2 -- 2 files changed, 7 deletions(-) diff --git a/src/dump.rs b/src/dump.rs index 6741bebe0e5..e35d13f06ae 100644 --- a/src/dump.rs +++ b/src/dump.rs @@ -501,11 +501,6 @@ fn maybe_render_point( &output_tuples)); } -fn write_string(f: &mut File, s: &str) -> io::Result<()> { - f.write_all(&s.bytes().collect::>())?; - Ok(()) -} - fn escape_for_graphviz(s: &str) -> String { s.replace(r"\", r"\\") .replace("\"", "\\\"") diff --git a/src/lib.rs b/src/lib.rs index 86e4acf1bb5..1fce5831b97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,3 @@ -#![allow(dead_code)] - extern crate clap; extern crate failure; extern crate polonius_engine; From 0be43938a3b6da77ed1edd0d0eedc1fd8d5c3fd4 Mon Sep 17 00:00:00 2001 From: lqd Date: Fri, 19 Apr 2019 16:27:55 +0200 Subject: [PATCH 4/5] Remove log from the main crate's dependencies --- Cargo.lock | 1 - Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d923bd5ad33..42a71869a9a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -420,7 +420,6 @@ dependencies = [ "diff 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.5.13 (registry+https://github.com/rust-lang/crates.io-index)", "failure 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "polonius-engine 0.7.0", "polonius-parser 0.2.0", "rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index dfc0b51794e..a81f28478a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,6 @@ assert_cli = "0.6" diff = "0.1.0" [dependencies] -log = "0.4" env_logger = "0.5" failure = "0.1.1" rustc-hash = "1.0.0" From 3d60a18622407352fd2c61ad97002abb3497fe26 Mon Sep 17 00:00:00 2001 From: lqd Date: Fri, 19 Apr 2019 16:32:53 +0200 Subject: [PATCH 5/5] Make polonius-parser a dev-dependency It's only used in tests, and doesn't need to be built to use the `polonius` bin. --- Cargo.toml | 2 +- src/lib.rs | 1 - src/program.rs | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a81f28478a8..2b0c71a34fd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,6 +12,7 @@ edition = "2018" [dev-dependencies] assert_cli = "0.6" diff = "0.1.0" +polonius-parser = {version = "0.2.0", path = "polonius-parser" } [dependencies] env_logger = "0.5" @@ -20,6 +21,5 @@ rustc-hash = "1.0.0" structopt = "0.2.8" clap = "2.31.2" polonius-engine = {version = "0.7.0", path = "polonius-engine" } -polonius-parser = {version = "0.2.0", path = "polonius-parser" } [workspace] diff --git a/src/lib.rs b/src/lib.rs index 1fce5831b97..a69df81b2cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,6 @@ extern crate clap; extern crate failure; extern crate polonius_engine; -extern crate polonius_parser; extern crate rustc_hash; extern crate structopt; diff --git a/src/program.rs b/src/program.rs index 34f06940774..fad459c284b 100644 --- a/src/program.rs +++ b/src/program.rs @@ -1,3 +1,5 @@ +#![cfg(test)] + use std::collections::BTreeSet; use polonius_parser::{