Skip to content

Commit bdf2dce

Browse files
committed
Get rid of some unused dependecies
1 parent 1a206fc commit bdf2dce

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ clippy-mini-macro-test = { version = "0.2", path = "mini-macro" }
3737
serde = { version = "1.0", features = ["derive"] }
3838
derive-new = "0.5"
3939
regex = "1.4"
40+
quote = "1"
41+
syn = { version = "1", features = ["full"] }
4042

4143
# A noop dependency that changes in the Rust repository, it's a bit of a hack.
4244
# See the `src/tools/rustc-workspace-hack/README.md` file in `rust-lang/rust`

clippy_lints/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,13 @@ pulldown-cmark = { version = "0.8", default-features = false }
2020
quine-mc_cluskey = "0.2.2"
2121
regex-syntax = "0.6"
2222
serde = { version = "1.0", features = ["derive"] }
23-
smallvec = { version = "1", features = ["union"] }
2423
toml = "0.5.3"
2524
unicode-normalization = "0.1"
2625
semver = "0.11"
2726
rustc-semver = "1.1.0"
2827
# NOTE: cargo requires serde feat in its url dep
2928
# see <https://github.com/rust-lang/rust/pull/63587#issuecomment-522343864>
3029
url = { version = "2.1.0", features = ["serde"] }
31-
quote = "1"
32-
syn = { version = "1", features = ["full"] }
3330

3431
[features]
3532
deny-warnings = []

clippy_utils/Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ if_chain = "1.0.0"
1010
itertools = "0.9"
1111
regex-syntax = "0.6"
1212
serde = { version = "1.0", features = ["derive"] }
13-
smallvec = { version = "1", features = ["union"] }
14-
toml = "0.5.3"
1513
unicode-normalization = "0.1"
1614
rustc-semver="1.1.0"
1715

clippy_utils/src/lib.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ use rustc_span::sym;
7979
use rustc_span::symbol::{kw, Ident, Symbol};
8080
use rustc_span::{Span, DUMMY_SP};
8181
use rustc_target::abi::Integer;
82-
use smallvec::SmallVec;
8382

8483
use crate::consts::{constant, Constant};
8584
use crate::ty::is_recursively_primitive_type;
@@ -1152,11 +1151,9 @@ pub fn match_panic_def_id(cx: &LateContext<'_>, did: DefId) -> bool {
11521151
/// sequence of `if/else`.
11531152
/// E.g., this returns `([a, b], [c, d, e])` for the expression
11541153
/// `if a { c } else if b { d } else { e }`.
1155-
pub fn if_sequence<'tcx>(
1156-
mut expr: &'tcx Expr<'tcx>,
1157-
) -> (SmallVec<[&'tcx Expr<'tcx>; 1]>, SmallVec<[&'tcx Block<'tcx>; 1]>) {
1158-
let mut conds = SmallVec::new();
1159-
let mut blocks: SmallVec<[&Block<'_>; 1]> = SmallVec::new();
1154+
pub fn if_sequence<'tcx>(mut expr: &'tcx Expr<'tcx>) -> (Vec<&'tcx Expr<'tcx>>, Vec<&'tcx Block<'tcx>>) {
1155+
let mut conds = Vec::new();
1156+
let mut blocks: Vec<&Block<'_>> = Vec::new();
11601157

11611158
while let ExprKind::If(ref cond, ref then_expr, ref else_expr) = expr.kind {
11621159
conds.push(&**cond);

0 commit comments

Comments
 (0)