Patchwork [1,of,2] rust-discovery: remove useless extern crate

login
register
mail settings
Submitter Yuya Nishihara
Date Aug. 16, 2019, 11:28 a.m.
Message ID <efcd5928d84224dea38b.1565954891@mimosa>
Download mbox | patch
Permalink /patch/41314/
State Accepted
Headers show

Comments

Yuya Nishihara - Aug. 16, 2019, 11:28 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1565947877 -32400
#      Fri Aug 16 18:31:17 2019 +0900
# Node ID efcd5928d84224dea38b08d1dc1e135b91e0c045
# Parent  e67d9b6bad4df2eaaf7544de8a39f41a3c08e2c2
rust-discovery: remove useless extern crate

Patch

diff --git a/rust/hg-core/src/discovery.rs b/rust/hg-core/src/discovery.rs
--- a/rust/hg-core/src/discovery.rs
+++ b/rust/hg-core/src/discovery.rs
@@ -10,17 +10,15 @@ 
 //! This is a Rust counterpart to the `partialdiscovery` class of
 //! `mercurial.setdiscovery`
 
-extern crate rand;
-extern crate rand_pcg;
-use self::rand::seq::SliceRandom;
-use self::rand::{thread_rng, RngCore, SeedableRng};
 use super::{Graph, GraphError, Revision, NULL_REVISION};
 use crate::ancestors::MissingAncestors;
 use crate::dagops;
+use rand::seq::SliceRandom;
+use rand::{thread_rng, RngCore, SeedableRng};
 use std::cmp::{max, min};
 use std::collections::{HashMap, HashSet, VecDeque};
 
-type Rng = self::rand_pcg::Pcg32;
+type Rng = rand_pcg::Pcg32;
 
 pub struct PartialDiscovery<G: Graph + Clone> {
     target_heads: Option<Vec<Revision>>,