Skip to content

Commit 7741516

Browse files
committed
std: Collapse SlicePrelude traits
This commit collapses the various prelude traits for slices into just one trait: * SlicePrelude/SliceAllocPrelude => SliceExt * CloneSlicePrelude/CloneSliceAllocPrelude => CloneSliceExt * OrdSlicePrelude/OrdSliceAllocPrelude => OrdSliceExt * PartialEqSlicePrelude => PartialEqSliceExt
1 parent 126db54 commit 7741516

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+782
-539
lines changed

src/etc/unicode.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ def emit_bsearch_range_table(f):
289289
f.write("""
290290
fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool {
291291
use core::cmp::Ordering::{Equal, Less, Greater};
292-
use core::slice::SlicePrelude;
292+
use core::slice::SliceExt;
293293
r.binary_search(|&(lo,hi)| {
294294
if lo <= c && c <= hi { Equal }
295295
else if hi < c { Less }
@@ -347,7 +347,7 @@ def emit_conversions_module(f, lowerupper, upperlower):
347347
f.write("pub mod conversions {")
348348
f.write("""
349349
use core::cmp::Ordering::{Equal, Less, Greater};
350-
use core::slice::SlicePrelude;
350+
use core::slice::SliceExt;
351351
use core::option::Option;
352352
use core::option::Option::{Some, None};
353353
use core::slice;
@@ -386,8 +386,8 @@ def emit_conversions_module(f, lowerupper, upperlower):
386386

387387
def emit_grapheme_module(f, grapheme_table, grapheme_cats):
388388
f.write("""pub mod grapheme {
389-
use core::slice::SlicePrelude;
390389
use core::kinds::Copy;
390+
use core::slice::SliceExt;
391391
pub use self::GraphemeCat::*;
392392
use core::slice;
393393
@@ -431,7 +431,7 @@ def emit_charwidth_module(f, width_table):
431431
f.write("pub mod charwidth {\n")
432432
f.write(" use core::option::Option;\n")
433433
f.write(" use core::option::Option::{Some, None};\n")
434-
f.write(" use core::slice::SlicePrelude;\n")
434+
f.write(" use core::slice::SliceExt;\n")
435435
f.write(" use core::slice;\n")
436436
f.write("""
437437
fn bsearch_range_value_table(c: char, is_cjk: bool, r: &'static [(char, char, u8, u8)]) -> u8 {
@@ -531,7 +531,7 @@ def comp_pfun(char):
531531
f.write("""
532532
fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 {
533533
use core::cmp::Ordering::{Equal, Less, Greater};
534-
use core::slice::SlicePrelude;
534+
use core::slice::SliceExt;
535535
use core::slice;
536536
match r.binary_search(|&(lo, hi, _)| {
537537
if lo <= c && c <= hi { Equal }

src/libcollections/hash/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ mod tests {
297297
use core::kinds::Sized;
298298
use std::mem;
299299

300-
use slice::SlicePrelude;
300+
use slice::SliceExt;
301301
use super::{Hash, Hasher, Writer};
302302

303303
struct MyWriterHasher;

src/libcollections/hash/sip.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ mod tests {
276276

277277
use str::Str;
278278
use string::String;
279-
use slice::{AsSlice, SlicePrelude};
279+
use slice::{AsSlice, SliceExt};
280280
use vec::Vec;
281281

282282
use super::super::{Hash, Writer};

src/libcollections/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#![allow(unknown_features)]
2525
#![feature(macro_rules, default_type_params, phase, globs)]
2626
#![feature(unsafe_destructor, import_shadowing, slicing_syntax)]
27-
#![feature(tuple_indexing, unboxed_closures)]
27+
#![feature(unboxed_closures)]
2828
#![no_std]
2929

3030
#[phase(plugin, link)] extern crate core;

0 commit comments

Comments
 (0)