Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
121b57b8
R
Rust
项目概览
int
/
Rust
接近 1 年 前同步成功
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rust
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
121b57b8
编写于
6月 15, 2018
作者:
S
Simon Sapin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move some alloc crate top-level items to a new alloc::collections module
This matches std::collections
上级
26324d0a
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
69 addition
and
46 deletion
+69
-46
src/liballoc/collections/binary_heap.rs
src/liballoc/collections/binary_heap.rs
+0
-0
src/liballoc/collections/btree/map.rs
src/liballoc/collections/btree/map.rs
+0
-0
src/liballoc/collections/btree/mod.rs
src/liballoc/collections/btree/mod.rs
+0
-0
src/liballoc/collections/btree/node.rs
src/liballoc/collections/btree/node.rs
+0
-0
src/liballoc/collections/btree/search.rs
src/liballoc/collections/btree/search.rs
+0
-0
src/liballoc/collections/btree/set.rs
src/liballoc/collections/btree/set.rs
+3
-3
src/liballoc/collections/linked_list.rs
src/liballoc/collections/linked_list.rs
+0
-0
src/liballoc/collections/mod.rs
src/liballoc/collections/mod.rs
+59
-0
src/liballoc/collections/vec_deque.rs
src/liballoc/collections/vec_deque.rs
+2
-2
src/liballoc/lib.rs
src/liballoc/lib.rs
+1
-36
src/liballoc/str.rs
src/liballoc/str.rs
+0
-1
src/libstd/collections/mod.rs
src/libstd/collections/mod.rs
+4
-4
未找到文件。
src/liballoc/binary_heap.rs
→
src/liballoc/
collections/
binary_heap.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/btree/map.rs
→
src/liballoc/
collections/
btree/map.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/btree/mod.rs
→
src/liballoc/
collections/
btree/mod.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/btree/node.rs
→
src/liballoc/
collections/
btree/node.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/btree/search.rs
→
src/liballoc/
collections/
btree/search.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/btree/set.rs
→
src/liballoc/
collections/
btree/set.rs
浏览文件 @
121b57b8
...
...
@@ -19,7 +19,7 @@
use
core
::
ops
::{
BitOr
,
BitAnd
,
BitXor
,
Sub
,
RangeBounds
};
use
borrow
::
Borrow
;
use
btree_map
::{
BTreeMap
,
Keys
};
use
collections
::
btree_map
::{
self
,
BTreeMap
,
Keys
};
use
super
::
Recover
;
// FIXME(conventions): implement bounded iterators
...
...
@@ -104,7 +104,7 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[derive(Debug)]
pub
struct
IntoIter
<
T
>
{
iter
:
::
btree_map
::
IntoIter
<
T
,
()
>
,
iter
:
btree_map
::
IntoIter
<
T
,
()
>
,
}
/// An iterator over a sub-range of items in a `BTreeSet`.
...
...
@@ -117,7 +117,7 @@ pub struct IntoIter<T> {
#[derive(Debug)]
#[stable(feature
=
"btree_range"
,
since
=
"1.17.0"
)]
pub
struct
Range
<
'a
,
T
:
'a
>
{
iter
:
::
btree_map
::
Range
<
'a
,
T
,
()
>
,
iter
:
btree_map
::
Range
<
'a
,
T
,
()
>
,
}
/// A lazy iterator producing elements in the difference of `BTreeSet`s.
...
...
src/liballoc/linked_list.rs
→
src/liballoc/
collections/
linked_list.rs
浏览文件 @
121b57b8
文件已移动
src/liballoc/collections/mod.rs
0 → 100644
浏览文件 @
121b57b8
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
//! Collection types.
#![stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
mod
binary_heap
;
mod
btree
;
pub
mod
linked_list
;
pub
mod
vec_deque
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
mod
btree_map
{
//! A map based on a B-Tree.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
super
::
btree
::
map
::
*
;
}
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
mod
btree_set
{
//! A set based on a B-Tree.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
super
::
btree
::
set
::
*
;
}
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[doc(no_inline)]
pub
use
self
::
binary_heap
::
BinaryHeap
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[doc(no_inline)]
pub
use
self
::
btree_map
::
BTreeMap
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[doc(no_inline)]
pub
use
self
::
btree_set
::
BTreeSet
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[doc(no_inline)]
pub
use
self
::
linked_list
::
LinkedList
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
#[doc(no_inline)]
pub
use
self
::
vec_deque
::
VecDeque
;
/// An intermediate trait for specialization of `Extend`.
#[doc(hidden)]
trait
SpecExtend
<
I
:
IntoIterator
>
{
/// Extends `self` with the contents of the given iterator.
fn
spec_extend
(
&
mut
self
,
iter
:
I
);
}
src/liballoc/vec_deque.rs
→
src/liballoc/
collections/
vec_deque.rs
浏览文件 @
121b57b8
...
...
@@ -2891,7 +2891,7 @@ fn test_split_off() {
#[test]
fn
test_from_vec
()
{
use
super
::
super
::
vec
::
Vec
;
use
vec
::
Vec
;
for
cap
in
0
..
35
{
for
len
in
0
..
cap
+
1
{
let
mut
vec
=
Vec
::
with_capacity
(
cap
);
...
...
@@ -2907,7 +2907,7 @@ fn test_from_vec() {
#[test]
fn
test_vec_from_vecdeque
()
{
use
super
::
super
::
vec
::
Vec
;
use
vec
::
Vec
;
fn
create_vec_and_test_convert
(
cap
:
usize
,
offset
:
usize
,
len
:
usize
)
{
let
mut
vd
=
VecDeque
::
with_capacity
(
cap
);
...
...
src/liballoc/lib.rs
浏览文件 @
121b57b8
...
...
@@ -162,59 +162,24 @@ mod boxed {
}
#[cfg(test)]
mod
boxed_test
;
pub
mod
collections
;
#[cfg(target_has_atomic
=
"ptr"
)]
pub
mod
arc
;
pub
mod
rc
;
pub
mod
raw_vec
;
// collections modules
pub
mod
binary_heap
;
mod
btree
;
pub
mod
borrow
;
pub
mod
fmt
;
pub
mod
linked_list
;
pub
mod
slice
;
pub
mod
str
;
pub
mod
string
;
pub
mod
vec
;
pub
mod
vec_deque
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
mod
btree_map
{
//! A map based on a B-Tree.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
btree
::
map
::
*
;
}
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
mod
btree_set
{
//! A set based on a B-Tree.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
btree
::
set
::
*
;
}
#[cfg(not(test))]
mod
std
{
pub
use
core
::
ops
;
// RangeFull
}
/// An intermediate trait for specialization of `Extend`.
#[doc(hidden)]
trait
SpecExtend
<
I
:
IntoIterator
>
{
/// Extends `self` with the contents of the given iterator.
fn
spec_extend
(
&
mut
self
,
iter
:
I
);
}
#[doc(no_inline)]
pub
use
binary_heap
::
BinaryHeap
;
#[doc(no_inline)]
pub
use
btree_map
::
BTreeMap
;
#[doc(no_inline)]
pub
use
btree_set
::
BTreeSet
;
#[doc(no_inline)]
pub
use
linked_list
::
LinkedList
;
#[doc(no_inline)]
pub
use
vec_deque
::
VecDeque
;
#[doc(no_inline)]
pub
use
string
::
String
;
#[doc(no_inline)]
...
...
src/liballoc/str.rs
浏览文件 @
121b57b8
...
...
@@ -51,7 +51,6 @@
use
slice
::{
SliceConcatExt
,
SliceIndex
};
use
string
::
String
;
use
vec
::
Vec
;
use
vec_deque
::
VecDeque
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
core
::
str
::{
FromStr
,
Utf8Error
};
...
...
src/libstd/collections/mod.rs
浏览文件 @
121b57b8
...
...
@@ -424,13 +424,13 @@
#[doc(hidden)]
pub
use
ops
::
Bound
;
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
alloc_crate
::{
BinaryHeap
,
BTreeMap
,
BTreeSet
};
pub
use
alloc_crate
::
collections
::
{
BinaryHeap
,
BTreeMap
,
BTreeSet
};
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
alloc_crate
::{
LinkedList
,
VecDeque
};
pub
use
alloc_crate
::
collections
::
{
LinkedList
,
VecDeque
};
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
alloc_crate
::{
binary_heap
,
btree_map
,
btree_set
};
pub
use
alloc_crate
::
collections
::
{
binary_heap
,
btree_map
,
btree_set
};
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
alloc_crate
::{
linked_list
,
vec_deque
};
pub
use
alloc_crate
::
collections
::
{
linked_list
,
vec_deque
};
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
use
self
::
hash_map
::
HashMap
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录