Tidy up use declaration syntax.

This commit is contained in:
Dan Gohman
2018-12-06 17:59:58 -05:00
parent 95a6a25db3
commit 5b03581442
7 changed files with 15 additions and 7 deletions

View File

@@ -1,10 +1,12 @@
//! Densely numbered entity references as mapping keys.
use iter::{Iter, IterMut};
use keys::Keys;
use std::marker::PhantomData;
use std::ops::{Index, IndexMut};
use std::slice;
use std::vec::Vec;
use {EntityRef, Iter, IterMut, Keys};
use EntityRef;
/// A mapping `K -> V` for densely indexed entity references.
///

View File

@@ -1,10 +1,12 @@
//! Densely numbered entity references as mapping keys.
use iter::{Iter, IterMut};
use keys::Keys;
use std::iter::FromIterator;
use std::marker::PhantomData;
use std::ops::{Index, IndexMut};
use std::slice;
use std::vec::Vec;
use {EntityRef, Iter, IterMut, Keys};
use EntityRef;
/// A primary mapping `K -> V` allocating dense entity references.
///

View File

@@ -1,8 +1,9 @@
//! Densely numbered entity references as set keys.
use keys::Keys;
use std::marker::PhantomData;
use std::vec::Vec;
use {EntityRef, Keys};
use EntityRef;
/// A set of `K` for densely indexed entity references.
///

View File

@@ -7,11 +7,12 @@
//! > Briggs, Torczon, *An efficient representation for sparse sets*,
//! ACM Letters on Programming Languages and Systems, Volume 2, Issue 1-4, March-Dec. 1993.
use map::SecondaryMap;
use std::mem;
use std::slice;
use std::u32;
use std::vec::Vec;
use {EntityRef, SecondaryMap};
use EntityRef;
/// Trait for extracting keys from values stored in a `SparseMap`.
///

View File

@@ -7,13 +7,14 @@ use cranelift_codegen::dbg::LOG_FILENAME_PREFIX;
use cranelift_codegen::timing;
use file_per_thread_logger;
use num_cpus;
use runone;
use std::panic::catch_unwind;
use std::path::{Path, PathBuf};
use std::sync::mpsc::{channel, Receiver, Sender};
use std::sync::{Arc, Mutex};
use std::thread;
use std::time::Duration;
use {runone, TestResult};
use TestResult;
/// Request sent to worker threads contains jobid and path.
struct Request(usize, PathBuf);

View File

@@ -5,12 +5,13 @@
use concurrent::{ConcurrentRunner, Reply};
use cranelift_codegen::timing;
use runone;
use std::error::Error;
use std::ffi::OsStr;
use std::fmt::{self, Display};
use std::path::{Path, PathBuf};
use std::time;
use {runone, TestResult};
use TestResult;
/// Timeout in seconds when we're not making progress.
const TIMEOUT_PANIC: usize = 10;

View File

@@ -132,8 +132,8 @@ impl DataContext {
#[cfg(test)]
mod tests {
use super::{DataContext, Init};
use cranelift_codegen::ir;
use {DataContext, Init};
#[test]
fn basic_data_context() {