Skip to content

Great renaming: propagate throughout the rest of the codebase #7468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 30, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions src/libextra/arc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,14 @@

#[allow(missing_doc)];

use core::prelude::*;

use sync;
use sync::{Mutex, mutex_with_condvars, RWlock, rwlock_with_condvars};

use core::cast;
use core::unstable::sync::UnsafeAtomicRcBox;
use core::task;
use core::borrow;
use std::cast;
use std::unstable::sync::UnsafeAtomicRcBox;
use std::task;
use std::borrow;

/// As sync::condvar, a mechanism for unlock-and-descheduling and signaling.
pub struct Condvar<'self> {
Expand Down Expand Up @@ -514,14 +513,13 @@ impl<'self, T:Freeze + Send> RWReadMode<'self, T> {

#[cfg(test)]
mod tests {
use core::prelude::*;

use arc::*;

use core::cell::Cell;
use core::comm;
use core::task;
use core::uint;
use std::cell::Cell;
use std::comm;
use std::task;
use std::uint;

#[test]
fn manually_share_arc() {
Expand Down
21 changes: 10 additions & 11 deletions src/libextra/arena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,21 @@

#[allow(missing_doc)];

use core::prelude::*;

use list::{MutList, MutCons, MutNil};

use core::at_vec;
use core::cast::{transmute, transmute_mut, transmute_mut_region};
use core::cast;
use core::ptr;
use core::sys;
use core::uint;
use core::vec;
use core::unstable::intrinsics;
use core::unstable::intrinsics::{TyDesc};
use std::at_vec;
use std::cast::{transmute, transmute_mut, transmute_mut_region};
use std::cast;
use std::ptr;
use std::sys;
use std::uint;
use std::vec;
use std::unstable::intrinsics;
use std::unstable::intrinsics::{TyDesc};

#[cfg(not(stage0))]
use core::unstable::intrinsics::{get_tydesc};
use std::unstable::intrinsics::{get_tydesc};

#[cfg(stage0)]
unsafe fn get_tydesc<T>() -> *TyDesc {
Expand Down
7 changes: 3 additions & 4 deletions src/libextra/base64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

//! Base64 binary-to-text encoding

use core::prelude::*;

use core::vec;
use std::vec;

/// A trait for converting a value to base64 encoding.
pub trait ToBase64 {
Expand Down Expand Up @@ -199,7 +198,7 @@ impl<'self> FromBase64 for &'self str {
* Convert any base64 encoded string (literal, `@`, `&`, or `~`)
* to the byte values it encodes.
*
* You can use the `from_bytes` function in `core::str`
* You can use the `from_bytes` function in `std::str`
* to turn a `[u8]` into a string with characters corresponding to those values.
*
* # Example
Expand All @@ -210,7 +209,7 @@ impl<'self> FromBase64 for &'self str {
* extern mod extra;
* use extra::base64::ToBase64;
* use extra::base64::FromBase64;
* use core::str;
* use std::str;
*
* fn main () {
* let hello_str = "Hello, World".to_base64();
Expand Down
19 changes: 9 additions & 10 deletions src/libextra/bitv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

#[allow(missing_doc)];

use core::prelude::*;

use core::cmp;
use core::ops;
use core::uint;
use core::vec;
use std::cmp;
use std::ops;
use std::uint;
use std::vec;

struct SmallBitv {
/// only the lowest nbits of this value are used. the rest is undefined.
Expand Down Expand Up @@ -863,15 +862,15 @@ impl BitvSet {

#[cfg(test)]
mod tests {
use std::test::BenchHarness;
use extra::test::BenchHarness;

use bitv::*;
use bitv;

use core::uint;
use core::vec;
use core::rand;
use core::rand::Rng;
use std::uint;
use std::vec;
use std::rand;
use std::rand::Rng;

static bench_bits : uint = 1 << 14;

Expand Down
9 changes: 4 additions & 5 deletions src/libextra/c_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@
* still held if needed.
*/

use core::prelude::*;

use core::option;
use core::ptr;
use std::option;
use std::ptr;

/**
* The type representing a foreign chunk of memory
Expand Down Expand Up @@ -150,8 +149,8 @@ mod tests {

use c_vec::*;

use core::libc::*;
use core::libc;
use std::libc::*;
use std::libc;

fn malloc(n: size_t) -> CVec<u8> {
unsafe {
Expand Down
9 changes: 4 additions & 5 deletions src/libextra/comm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ Higher level communication abstractions.

#[allow(missing_doc)];

use core::prelude::*;

use core::comm::{GenericChan, GenericSmartChan, GenericPort};
use core::comm::{Chan, Port, Selectable, Peekable};
use core::comm;
use core::pipes;
use std::comm::{GenericChan, GenericSmartChan, GenericPort};
use std::comm::{Chan, Port, Selectable, Peekable};
use std::comm;
use std::pipes;

/// An extension of `pipes::stream` that allows both sending and receiving.
pub struct DuplexStream<T, U> {
Expand Down
5 changes: 2 additions & 3 deletions src/libextra/crypto/digest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use core::uint;
use core::vec;
use std::uint;
use std::vec;

/**
* The Digest trait specifies an interface common to digest functions, such as SHA-1 and the SHA-2
Expand Down
3 changes: 1 addition & 2 deletions src/libextra/crypto/sha1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* the `reset` method.
*/

use core::prelude::*;

use digest::Digest;

Expand Down Expand Up @@ -241,7 +240,7 @@ impl Digest for Sha1 {

#[cfg(test)]
mod tests {
use core::vec;
use std::vec;

use digest::{Digest, DigestUtil};
use sha1::Sha1;
Expand Down
3 changes: 1 addition & 2 deletions src/libextra/crypto/sha2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

use core::prelude::*;

use core::uint;
use std::uint;

use digest::Digest;

Expand Down
6 changes: 3 additions & 3 deletions src/libextra/dbg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@

#[allow(missing_doc)];

use core::cast::transmute;
use std::cast::transmute;
#[cfg(stage0)]
use intrinsic::{get_tydesc};
#[cfg(not(stage0))]
use core::unstable::intrinsics::{get_tydesc};
use std::unstable::intrinsics::{get_tydesc};

pub mod rustrt {
#[cfg(stage0)]
use intrinsic::{TyDesc};
#[cfg(not(stage0))]
use core::unstable::intrinsics::{TyDesc};
use std::unstable::intrinsics::{TyDesc};

#[abi = "cdecl"]
pub extern {
Expand Down
23 changes: 11 additions & 12 deletions src/libextra/deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@
// except according to those terms.

//! A double-ended queue implemented as a circular buffer
use core::prelude::*;

use core::uint;
use core::util::replace;
use core::vec;
use core::cast::transmute;
use std::uint;
use std::util::replace;
use std::vec;
use std::cast::transmute;

static initial_capacity: uint = 32u; // 2^5

Expand Down Expand Up @@ -254,9 +253,9 @@ fn get<'r, T>(elts: &'r [Option<T>], i: uint) -> &'r T {
#[cfg(test)]
mod tests {
use super::*;
use core::cmp::Eq;
use core::kinds::Copy;
use core;
use std::cmp::Eq;
use std::kinds::Copy;
use std::int;

#[test]
fn test_simple() {
Expand Down Expand Up @@ -463,12 +462,12 @@ mod tests {
#[test]
fn test_iter() {
let mut d = Deque::new();
for core::int::range(0,5) |i| {
for int::range(0,5) |i| {
d.add_back(i);
}
assert_eq!(d.iter().collect::<~[&int]>(), ~[&0,&1,&2,&3,&4]);

for core::int::range(6,9) |i| {
for int::range(6,9) |i| {
d.add_front(i);
}
assert_eq!(d.iter().collect::<~[&int]>(), ~[&8,&7,&6,&0,&1,&2,&3,&4]);
Expand All @@ -477,12 +476,12 @@ mod tests {
#[test]
fn test_rev_iter() {
let mut d = Deque::new();
for core::int::range(0,5) |i| {
for int::range(0,5) |i| {
d.add_back(i);
}
assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0]);

for core::int::range(6,9) |i| {
for int::range(6,9) |i| {
d.add_front(i);
}
assert_eq!(d.rev_iter().collect::<~[&int]>(), ~[&4,&3,&2,&1,&0,&6,&7,&8]);
Expand Down
4 changes: 1 addition & 3 deletions src/libextra/dlist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ Do not use ==, !=, <, etc on doubly-linked lists -- it may not terminate.

*/

use core::prelude::*;

use core::managed;
use std::managed;

pub type DListLink<T> = Option<@mut DListNode<T>>;

Expand Down Expand Up @@ -522,7 +521,6 @@ impl<T:Copy> DList<T> {

#[cfg(test)]
mod tests {
use core::prelude::*;

use super::*;

Expand Down
25 changes: 12 additions & 13 deletions src/libextra/ebml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@

#[allow(missing_doc)];

use core::prelude::*;

use core::str;
use std::str;

// Simple Extensible Binary Markup Language (ebml) reader and writer on a
// cursor model. See the specification here:
Expand Down Expand Up @@ -94,18 +93,18 @@ pub mod reader {

use serialize;

use core::cast::transmute;
use core::int;
use core::io;
use core::option::{None, Option, Some};
use std::cast::transmute;
use std::int;
use std::io;
use std::option::{None, Option, Some};

#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
use core::ptr::offset;
use std::ptr::offset;

#[cfg(target_arch = "x86")]
#[cfg(target_arch = "x86_64")]
use core::unstable::intrinsics::bswap32;
use std::unstable::intrinsics::bswap32;

// ebml reading

Expand Down Expand Up @@ -378,7 +377,7 @@ pub mod reader {
fn read_u8 (&mut self) -> u8 { doc_as_u8 (self.next_doc(EsU8 )) }
fn read_uint(&mut self) -> uint {
let v = doc_as_u64(self.next_doc(EsUint));
if v > (::core::uint::max_value as u64) {
if v > (::std::uint::max_value as u64) {
fail!("uint %? too large for this architecture", v);
}
v as uint
Expand Down Expand Up @@ -611,8 +610,8 @@ pub mod reader {
pub mod writer {
use super::*;

use core::cast;
use core::io;
use std::cast;
use std::io;

// ebml writing
pub struct Encoder {
Expand Down Expand Up @@ -957,8 +956,8 @@ mod tests {
use serialize::Encodable;
use serialize;

use core::io;
use core::option::{None, Option, Some};
use std::io;
use std::option::{None, Option, Some};

#[test]
fn test_option_int() {
Expand Down
Loading