Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit 00188b4

Browse files
committed
Changed all 'use std::' to 'use core::'.
1 parent adf217b commit 00188b4

File tree

12 files changed

+26
-37
lines changed

12 files changed

+26
-37
lines changed

Diff for: src/drivers/chario.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@
1515

1616
//! Generic char output trait.
1717
18-
use std::option::{Some, None};
19-
use std::str::{Str, StrSlice};
20-
use std::slice::{Vector, ImmutableVector};
21-
use std::container::Container;
22-
use std::iter::Iterator;
18+
use core::option::{Some, None};
19+
use core::str::{Str, StrSlice};
20+
use core::slice::{Vector, ImmutableVector};
21+
use core::container::Container;
22+
use core::iter::Iterator;
2323

24-
use std::mem::init;
24+
use core::mem::init;
2525

2626
use lib::strconv;
2727

Diff for: src/drivers/dht22.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
use std::option::{Option, Some, None};
17-
use std::iter::{Iterator, range};
16+
use core::option::{Option, Some, None};
17+
use core::iter::{Iterator, range};
1818

1919
use hal::gpio::{GPIOConf, Low, High, In, Out, Level};
2020
use hal::timer::Timer;

Diff for: src/drivers/lcd/c12332.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ The driver uses SPI bus for output only, it never reads back from SPI, which
2323
might be an issue for any other peripheral sharing the same SPI bus.
2424
*/
2525

26-
use std::cell;
27-
use std::slice::ImmutableVector;
28-
use std::mem::init;
26+
use core::cell;
27+
use core::slice::ImmutableVector;
28+
use core::mem::init;
2929

3030
use super::font_small_7;
3131
use super::LCD;

Diff for: src/hal/lpc17xx/peripheral_clock.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Peripheral clock management.
1919
This module should be considered private until further notice.
2020
*/
2121

22-
use std::intrinsics::abort;
22+
use core::intrinsics::abort;
2323

2424
use super::init::system_clock;
2525

Diff for: src/hal/lpc17xx/pin.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Some pins that could be configured here may be missing from actual MCU depending
2020
on the package.
2121
*/
2222

23-
use std::intrinsics::abort;
23+
use core::intrinsics::abort;
2424

2525
#[path="pinmap.rs"] pub mod map;
2626

Diff for: src/hal/lpc17xx/ssp.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Currently supports only SPI mode. Note that `SPI` is not the same peripheral and
2020
it's currently not supported at all.
2121
*/
2222

23-
use std::intrinsics::abort;
23+
use core::intrinsics::abort;
2424

2525
use hal::lpc17xx::peripheral_clock::{PeripheralClock, SSP0Clock, SSP1Clock};
2626
use hal::lpc17xx::init::system_clock;

Diff for: src/hal/lpc17xx/uart.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ This code doesn't support UART1, while it really should (UART1 has more features
2020
than other UARTs in MCU).
2121
*/
2222

23-
use std::intrinsics::abort;
23+
use core::intrinsics::abort;
2424

2525
use hal::lpc17xx::peripheral_clock::{PeripheralClock, UART0Clock, UART2Clock, UART3Clock};
2626
use drivers::chario::CharIO;

Diff for: src/lib/strconv.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
//! A simple integer-to-string conversion code with statically sized buffers.
1717
18-
use std::mem::uninit;
18+
use core::mem::uninit;
1919

2020
pub fn itoa(val: u32, buf : &mut [u8], base: u32) {
2121
let mut rbuf : [u8, ..32] = unsafe { uninit() };

Diff for: src/lib/volatile_cell.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
//! A cell that with volatile setter and getter.
1717
18-
use std::kinds::marker;
19-
use std::intrinsics::{volatile_load, volatile_store};
20-
use std::cast::transmute_mut_unsafe;
18+
use core::kinds::marker;
19+
use core::intrinsics::{volatile_load, volatile_store};
20+
use core::cast::transmute_mut_unsafe;
2121

2222
pub struct VolatileCell<T> {
2323
value: T,

Diff for: src/main.rs

+1-12
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,5 @@ pub mod lib;
5252
pub mod os;
5353

5454
mod std {
55-
pub use core::cast;
56-
pub use core::cell;
57-
pub use core::cmp; // this seem to be the only required reexport
58-
// used for #[deriving(Eq)]
59-
pub use core::container;
60-
pub use core::intrinsics;
61-
pub use core::iter;
62-
pub use core::kinds;
63-
pub use core::mem;
64-
pub use core::option;
65-
pub use core::slice;
66-
pub use core::str;
55+
pub use core::cmp; // used for #[deriving(Eq)] until fixed in rust.
6756
}

Diff for: src/os/debug.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515

1616
//! debug::port provides interface to output structured data over serial port.
1717
18-
use std::mem::size_of;
19-
use std::cast::transmute;
20-
use std::intrinsics::abort;
18+
use core::mem::size_of;
19+
use core::cast::transmute;
20+
use core::intrinsics::abort;
2121

2222
use drivers::chario::CharIO;
2323
use hal::uart::{UART, UARTConf};

Diff for: src/os/task.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515

1616
//! Basic multitasking interface.
1717
18-
use std::mem::size_of;
19-
use std::intrinsics::abort;
18+
use core::mem::size_of;
19+
use core::intrinsics::abort;
2020

2121
use hal::cortex_m3::{sched, systick};
2222
use os::syscall::syscall;
@@ -45,7 +45,7 @@ static ReservedPivilegedStackSize: u32 = 256;
4545
static MaxTasksCount: uint = 4;
4646

4747
mod defined_tasks_count {
48-
use std::intrinsics::abort;
48+
use core::intrinsics::abort;
4949

5050
/// Total defined tasks count.
5151
static mut DefinedTasksCount: uint = 0;

0 commit comments

Comments
 (0)