Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
2d690ae4
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,发现更多精彩内容 >>
提交
2d690ae4
编写于
9月 04, 2012
作者:
P
Patrick Walton
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libstd: "import" -> "use"
上级
43707386
变更
32
隐藏空白更改
内联
并排
Showing
32 changed file
with
126 addition
and
135 deletion
+126
-135
src/libstd/arc.rs
src/libstd/arc.rs
+2
-3
src/libstd/arena.rs
src/libstd/arena.rs
+4
-5
src/libstd/base64.rs
src/libstd/base64.rs
+1
-1
src/libstd/bitv.rs
src/libstd/bitv.rs
+1
-1
src/libstd/comm.rs
src/libstd/comm.rs
+1
-1
src/libstd/dbg.rs
src/libstd/dbg.rs
+1
-1
src/libstd/deque.rs
src/libstd/deque.rs
+2
-2
src/libstd/ebml.rs
src/libstd/ebml.rs
+2
-2
src/libstd/fun_treemap.rs
src/libstd/fun_treemap.rs
+3
-3
src/libstd/getopts.rs
src/libstd/getopts.rs
+4
-4
src/libstd/json.rs
src/libstd/json.rs
+5
-8
src/libstd/list.rs
src/libstd/list.rs
+4
-4
src/libstd/map.rs
src/libstd/map.rs
+8
-8
src/libstd/net.rs
src/libstd/net.rs
+3
-3
src/libstd/net_ip.rs
src/libstd/net_ip.rs
+17
-19
src/libstd/net_tcp.rs
src/libstd/net_tcp.rs
+8
-8
src/libstd/net_url.rs
src/libstd/net_url.rs
+7
-8
src/libstd/par.rs
src/libstd/par.rs
+1
-1
src/libstd/prettyprint.rs
src/libstd/prettyprint.rs
+3
-3
src/libstd/smallintmap.rs
src/libstd/smallintmap.rs
+4
-4
src/libstd/sort.rs
src/libstd/sort.rs
+2
-2
src/libstd/sync.rs
src/libstd/sync.rs
+1
-1
src/libstd/tempfile.rs
src/libstd/tempfile.rs
+2
-3
src/libstd/term.rs
src/libstd/term.rs
+1
-1
src/libstd/test.rs
src/libstd/test.rs
+7
-7
src/libstd/time.rs
src/libstd/time.rs
+4
-4
src/libstd/timer.rs
src/libstd/timer.rs
+4
-4
src/libstd/treemap.rs
src/libstd/treemap.rs
+3
-3
src/libstd/uv.rs
src/libstd/uv.rs
+3
-3
src/libstd/uv_global_loop.rs
src/libstd/uv_global_loop.rs
+9
-9
src/libstd/uv_iotask.rs
src/libstd/uv_iotask.rs
+6
-6
src/libstd/uv_ll.rs
src/libstd/uv_ll.rs
+3
-3
未找到文件。
src/libstd/arc.rs
浏览文件 @
2d690ae4
...
...
@@ -6,11 +6,10 @@
* between tasks.
*/
import
unsafe
::{
SharedMutableState
,
shared_mutable_state
,
use
unsafe
::{
SharedMutableState
,
shared_mutable_state
,
clone_shared_mutable_state
,
unwrap_shared_mutable_state
,
get_shared_mutable_state
,
get_shared_immutable_state
};
import
sync
;
import
sync
::{
Mutex
,
mutex_with_condvars
,
use
sync
::{
Mutex
,
mutex_with_condvars
,
RWlock
,
rwlock_with_condvars
};
export
ARC
,
clone
,
get
;
...
...
src/libstd/arena.rs
浏览文件 @
2d690ae4
...
...
@@ -24,11 +24,10 @@
export
Arena
,
arena_with_size
;
import
list
;
import
list
::{
list
,
cons
,
nil
};
import
unsafe
::
reinterpret_cast
;
import
sys
::
TypeDesc
;
import
libc
::
size_t
;
use
list
::{
list
,
cons
,
nil
};
use
unsafe
::
reinterpret_cast
;
use
sys
::
TypeDesc
;
use
libc
::
size_t
;
#[abi
=
"rust-intrinsic"
]
extern
mod
rusti
{
...
...
src/libstd/base64.rs
浏览文件 @
2d690ae4
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
io
::
Reader
;
use
io
::
Reader
;
trait
ToBase64
{
fn
to_base64
()
->
~
str
;
...
...
src/libstd/bitv.rs
浏览文件 @
2d690ae4
import
vec
::{
to_mut
,
from_elem
};
use
vec
::{
to_mut
,
from_elem
};
export
Bitv
;
export
union
;
...
...
src/libstd/comm.rs
浏览文件 @
2d690ae4
...
...
@@ -8,7 +8,7 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
pipes
::{
Channel
,
Recv
,
Chan
,
Port
,
Selectable
};
use
pipes
::{
Channel
,
Recv
,
Chan
,
Port
,
Selectable
};
export
DuplexStream
;
...
...
src/libstd/dbg.rs
浏览文件 @
2d690ae4
...
...
@@ -2,7 +2,7 @@
#[forbid(deprecated_pattern)]
;
//! Unsafe debugging functions for inspecting values.
import
unsafe
::
reinterpret_cast
;
use
unsafe
::
reinterpret_cast
;
export
debug_tydesc
;
export
debug_opaque
;
...
...
src/libstd/deque.rs
浏览文件 @
2d690ae4
//! A deque. Untested as of yet. Likely buggy
import
option
::{
Some
,
None
};
import
dvec
::
DVec
;
use
option
::{
Some
,
None
};
use
dvec
::
DVec
;
trait
Deque
<
T
>
{
fn
size
()
->
uint
;
...
...
src/libstd/ebml.rs
浏览文件 @
2d690ae4
// Simple Extensible Binary Markup Language (ebml) reader and writer on a
// cursor model. See the specification here:
// http://www.matroska.org/technical/specs/rfc/index.html
import
core
::
Option
;
import
option
::{
Some
,
None
};
use
core
::
Option
;
use
option
::{
Some
,
None
};
export
Doc
;
export
doc_at
;
...
...
src/libstd/fun_treemap.rs
浏览文件 @
2d690ae4
...
...
@@ -12,9 +12,9 @@
* of features.
*/
import
core
::
cmp
::{
Eq
,
Ord
};
import
option
::{
Some
,
None
};
import
option
=
option
;
use
core
::
cmp
::{
Eq
,
Ord
};
use
option
::{
Some
,
None
};
use
option
=
option
;
export
Treemap
;
export
init
;
...
...
src/libstd/getopts.rs
浏览文件 @
2d690ae4
...
...
@@ -65,10 +65,10 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
core
::
cmp
::
Eq
;
import
core
::
result
::{
Err
,
Ok
};
import
core
::
option
;
import
core
::
option
::{
Some
,
None
};
use
core
::
cmp
::
Eq
;
use
core
::
result
::{
Err
,
Ok
};
use
core
::
option
;
use
core
::
option
::{
Some
,
None
};
export
Opt
;
export
reqopt
;
export
optopt
;
...
...
src/libstd/json.rs
浏览文件 @
2d690ae4
...
...
@@ -3,14 +3,11 @@
//! json serialization
import
core
::
cmp
::
Eq
;
import
result
::{
Result
,
Ok
,
Err
};
import
io
;
import
io
::
WriterUtil
;
import
map
;
import
map
::
hashmap
;
import
map
::
map
;
import
sort
;
use
core
::
cmp
::
Eq
;
use
result
::{
Result
,
Ok
,
Err
};
use
io
::
WriterUtil
;
use
map
::
hashmap
;
use
map
::
map
;
export
Json
;
export
Error
;
...
...
src/libstd/list.rs
浏览文件 @
2d690ae4
...
...
@@ -2,10 +2,10 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
core
::
cmp
::
Eq
;
import
core
::
option
;
import
option
::
*
;
import
option
::{
Some
,
None
};
use
core
::
cmp
::
Eq
;
use
core
::
option
;
use
option
::
*
;
use
option
::{
Some
,
None
};
enum
list
<
T
>
{
cons
(
T
,
@
list
<
T
>
),
...
...
src/libstd/map.rs
浏览文件 @
2d690ae4
...
...
@@ -3,14 +3,14 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
io
::
WriterUtil
;
import
to_str
::
ToStr
;
import
managed
::
Managed
;
import
send_map
::
linear
::
LinearMap
;
import
core
::
cmp
::
Eq
;
import
hash
::
Hash
;
import
to_bytes
::
IterBytes
;
use
io
::
WriterUtil
;
use
to_str
::
ToStr
;
use
managed
::
Managed
;
use
send_map
::
linear
::
LinearMap
;
use
core
::
cmp
::
Eq
;
use
hash
::
Hash
;
use
to_bytes
::
IterBytes
;
export
hashmap
,
hashfn
,
eqfn
,
set
,
map
,
chained
,
hashmap
,
str_hash
;
export
box_str_hash
;
...
...
src/libstd/net.rs
浏览文件 @
2d690ae4
//! Top-level module for network-related functionality
import
tcp
=
net_tcp
;
use
tcp
=
net_tcp
;
export
tcp
;
import
ip
=
net_ip
;
use
ip
=
net_ip
;
export
ip
;
import
url
=
net_url
;
use
url
=
net_url
;
export
url
;
\ No newline at end of file
src/libstd/net_ip.rs
浏览文件 @
2d690ae4
//! Types/fns concerning Internet Protocol (IP), versions 4 & 6
import
vec
;
import
uint
;
import
iotask
=
uv
::
iotask
::
IoTask
;
import
interact
=
uv
::
iotask
::
interact
;
use
iotask
=
uv
::
iotask
::
IoTask
;
use
interact
=
uv
::
iotask
::
interact
;
import
sockaddr_in
=
uv
::
ll
::
sockaddr_in
;
import
sockaddr_in6
=
uv
::
ll
::
sockaddr_in6
;
import
addrinfo
=
uv
::
ll
::
addrinfo
;
import
uv_getaddrinfo_t
=
uv
::
ll
::
uv_getaddrinfo_t
;
import
uv_ip4_addr
=
uv
::
ll
::
ip4_addr
;
import
uv_ip4_name
=
uv
::
ll
::
ip4_name
;
import
uv_ip6_addr
=
uv
::
ll
::
ip6_addr
;
import
uv_ip6_name
=
uv
::
ll
::
ip6_name
;
import
uv_getaddrinfo
=
uv
::
ll
::
getaddrinfo
;
import
uv_freeaddrinfo
=
uv
::
ll
::
freeaddrinfo
;
import
create_uv_getaddrinfo_t
=
uv
::
ll
::
getaddrinfo_t
;
import
set_data_for_req
=
uv
::
ll
::
set_data_for_req
;
import
get_data_for_req
=
uv
::
ll
::
get_data_for_req
;
import
ll
=
uv
::
ll
;
import
comm
=
core
::
comm
;
use
sockaddr_in
=
uv
::
ll
::
sockaddr_in
;
use
sockaddr_in6
=
uv
::
ll
::
sockaddr_in6
;
use
addrinfo
=
uv
::
ll
::
addrinfo
;
use
uv_getaddrinfo_t
=
uv
::
ll
::
uv_getaddrinfo_t
;
use
uv_ip4_addr
=
uv
::
ll
::
ip4_addr
;
use
uv_ip4_name
=
uv
::
ll
::
ip4_name
;
use
uv_ip6_addr
=
uv
::
ll
::
ip6_addr
;
use
uv_ip6_name
=
uv
::
ll
::
ip6_name
;
use
uv_getaddrinfo
=
uv
::
ll
::
getaddrinfo
;
use
uv_freeaddrinfo
=
uv
::
ll
::
freeaddrinfo
;
use
create_uv_getaddrinfo_t
=
uv
::
ll
::
getaddrinfo_t
;
use
set_data_for_req
=
uv
::
ll
::
set_data_for_req
;
use
get_data_for_req
=
uv
::
ll
::
get_data_for_req
;
use
ll
=
uv
::
ll
;
use
comm
=
core
::
comm
;
export
IpAddr
,
parse_addr_err
;
export
format_addr
;
...
...
src/libstd/net_tcp.rs
浏览文件 @
2d690ae4
//! High-level interface to libuv's TCP functionality
import
ip
=
net_ip
;
import
uv
::
iotask
;
import
uv
::
iotask
::
IoTask
;
import
future_spawn
=
future
::
spawn
;
use
ip
=
net_ip
;
use
uv
::
iotask
;
use
uv
::
iotask
::
IoTask
;
use
future_spawn
=
future
::
spawn
;
// FIXME #1935
// should be able to, but can't atm, replace w/ result::{result, extensions};
import
result
::
*
;
import
libc
::
size_t
;
import
io
::{
Reader
,
ReaderUtil
,
Writer
};
import
comm
=
core
::
comm
;
use
result
::
*
;
use
libc
::
size_t
;
use
io
::{
Reader
,
ReaderUtil
,
Writer
};
use
comm
=
core
::
comm
;
// tcp interfaces
export
TcpSocket
;
...
...
src/libstd/net_url.rs
浏览文件 @
2d690ae4
//! Types/fns concerning URLs (see RFC 3986)
import
core
::
cmp
::
Eq
;
import
map
;
import
map
::{
hashmap
,
str_hash
};
import
io
::{
Reader
,
ReaderUtil
};
import
dvec
::
DVec
;
import
from_str
::
FromStr
;
import
result
::{
Err
,
Ok
};
import
to_str
::
ToStr
;
use
core
::
cmp
::
Eq
;
use
map
::{
hashmap
,
str_hash
};
use
io
::{
Reader
,
ReaderUtil
};
use
dvec
::
DVec
;
use
from_str
::
FromStr
;
use
result
::{
Err
,
Ok
};
use
to_str
::
ToStr
;
export
Url
,
url
,
userinfo
,
query
;
export
from_str
,
to_str
;
...
...
src/libstd/par.rs
浏览文件 @
2d690ae4
import
future_spawn
=
future
::
spawn
;
use
future_spawn
=
future
::
spawn
;
export
map
,
mapi
,
alli
,
any
,
mapi_factory
;
...
...
src/libstd/prettyprint.rs
浏览文件 @
2d690ae4
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
io
::
Writer
;
import
io
::
WriterUtil
;
import
serialization
::
serializer
;
use
io
::
Writer
;
use
io
::
WriterUtil
;
use
serialization
::
serializer
;
impl
Writer
:
serializer
{
fn
emit_nil
()
{
...
...
src/libstd/smallintmap.rs
浏览文件 @
2d690ae4
...
...
@@ -2,10 +2,10 @@
* A simple map based on a vector for small integer keys. Space requirements
* are O(highest integer key).
*/
import
core
::
option
;
import
core
::
option
::{
Some
,
None
};
import
dvec
::
DVec
;
import
map
::
map
;
use
core
::
option
;
use
core
::
option
::{
Some
,
None
};
use
dvec
::
DVec
;
use
map
::
map
;
// FIXME (#2347): Should not be @; there's a bug somewhere in rustc that
// requires this to be.
...
...
src/libstd/sort.rs
浏览文件 @
2d690ae4
...
...
@@ -2,8 +2,8 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
vec
::{
len
,
push
};
import
core
::
cmp
::{
Eq
,
Ord
};
use
vec
::{
len
,
push
};
use
core
::
cmp
::{
Eq
,
Ord
};
export
le
;
export
merge_sort
;
...
...
src/libstd/sync.rs
浏览文件 @
2d690ae4
...
...
@@ -11,7 +11,7 @@
export
Condvar
,
Semaphore
,
Mutex
,
mutex_with_condvars
;
export
RWlock
,
rwlock_with_condvars
,
RWlockReadMode
,
RWlockWriteMode
;
import
unsafe
::{
Exclusive
,
exclusive
};
use
unsafe
::{
Exclusive
,
exclusive
};
/****************************************************************************
* Internals
...
...
src/libstd/tempfile.rs
浏览文件 @
2d690ae4
...
...
@@ -3,9 +3,8 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
core
::
option
;
import
option
::{
None
,
Some
};
import
rand
;
use
core
::
option
;
use
option
::{
None
,
Some
};
fn
mkdtemp
(
tmpdir
:
&
Path
,
suffix
:
&
str
)
->
Option
<
Path
>
{
let
r
=
rand
::
Rng
();
...
...
src/libstd/term.rs
浏览文件 @
2d690ae4
//! Simple ANSI color library
import
core
::
Option
;
use
core
::
Option
;
// FIXME (#2807): Windows support.
...
...
src/libstd/test.rs
浏览文件 @
2d690ae4
...
...
@@ -5,13 +5,13 @@
// simplest interface possible for representing and running tests
// while providing a base that other test frameworks may build off of.
import
core
::
cmp
::
Eq
;
import
either
::
Either
;
import
result
::{
Ok
,
Err
};
import
io
::
WriterUtil
;
import
libc
::
size_t
;
import
task
::
TaskBuilder
;
import
comm
=
core
::
comm
;
use
core
::
cmp
::
Eq
;
use
either
::
Either
;
use
result
::{
Ok
,
Err
};
use
io
::
WriterUtil
;
use
libc
::
size_t
;
use
task
::
TaskBuilder
;
use
comm
=
core
::
comm
;
export
test_name
;
export
test_fn
;
...
...
src/libstd/time.rs
浏览文件 @
2d690ae4
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
core
::
cmp
::
Eq
;
import
libc
::{
c_char
,
c_int
,
c_long
,
size_t
,
time_t
};
import
io
::
Reader
;
import
result
::{
Result
,
Ok
,
Err
};
use
core
::
cmp
::
Eq
;
use
libc
::{
c_char
,
c_int
,
c_long
,
size_t
,
time_t
};
use
io
::
Reader
;
use
result
::{
Result
,
Ok
,
Err
};
export
Timespec
,
...
...
src/libstd/timer.rs
浏览文件 @
2d690ae4
...
...
@@ -3,10 +3,10 @@
#[forbid(deprecated_mode)]
;
#[forbid(deprecated_pattern)]
;
import
uv
=
uv
;
import
uv
::
iotask
;
import
iotask
::
IoTask
;
import
comm
=
core
::
comm
;
use
uv
=
uv
;
use
uv
::
iotask
;
use
iotask
::
IoTask
;
use
comm
=
core
::
comm
;
export
delayed_send
,
sleep
,
recv_timeout
;
...
...
src/libstd/treemap.rs
浏览文件 @
2d690ae4
...
...
@@ -6,9 +6,9 @@
* red-black tree or something else.
*/
import
core
::
cmp
::{
Eq
,
Ord
};
import
core
::
option
::{
Some
,
None
};
import
Option
=
core
::
Option
;
use
core
::
cmp
::{
Eq
,
Ord
};
use
core
::
option
::{
Some
,
None
};
use
Option
=
core
::
Option
;
export
treemap
;
export
insert
;
...
...
src/libstd/uv.rs
浏览文件 @
2d690ae4
...
...
@@ -23,11 +23,11 @@
* facilities.
*/
import
ll
=
uv_ll
;
use
ll
=
uv_ll
;
export
ll
;
import
iotask
=
uv_iotask
;
use
iotask
=
uv_iotask
;
export
iotask
;
import
global_loop
=
uv_global_loop
;
use
global_loop
=
uv_global_loop
;
export
global_loop
;
src/libstd/uv_global_loop.rs
浏览文件 @
2d690ae4
...
...
@@ -2,15 +2,15 @@
export
get
;
import
ll
=
uv_ll
;
import
iotask
=
uv_iotask
;
import
get_gl
=
get
;
import
iotask
::{
IoTask
,
spawn_iotask
};
import
priv
::{
chan_from_global_ptr
,
weaken_task
};
import
comm
=
core
::
comm
;
import
comm
::{
Port
,
Chan
,
select2
,
listen
};
import
task
::
TaskBuilder
;
import
either
::{
Left
,
Right
};
use
ll
=
uv_ll
;
use
iotask
=
uv_iotask
;
use
get_gl
=
get
;
use
iotask
::{
IoTask
,
spawn_iotask
};
use
priv
::{
chan_from_global_ptr
,
weaken_task
};
use
comm
=
core
::
comm
;
use
comm
::{
Port
,
Chan
,
select2
,
listen
};
use
task
::
TaskBuilder
;
use
either
::{
Left
,
Right
};
extern
mod
rustrt
{
fn
rust_uv_get_kernel_global_chan_ptr
()
->
*
libc
::
uintptr_t
;
...
...
src/libstd/uv_iotask.rs
浏览文件 @
2d690ae4
...
...
@@ -10,12 +10,12 @@
export
interact
;
export
exit
;
import
libc
::
c_void
;
import
ptr
::
addr_of
;
import
comm
=
core
::
comm
;
import
comm
::{
Port
,
Chan
,
listen
};
import
task
::
TaskBuilder
;
import
ll
=
uv_ll
;
use
libc
::
c_void
;
use
ptr
::
addr_of
;
use
comm
=
core
::
comm
;
use
comm
::{
Port
,
Chan
,
listen
};
use
task
::
TaskBuilder
;
use
ll
=
uv_ll
;
/// Used to abstract-away direct interaction with a libuv loop.
enum
IoTask
{
...
...
src/libstd/uv_ll.rs
浏览文件 @
2d690ae4
...
...
@@ -22,9 +22,9 @@
#[allow(non_camel_case_types)]
;
// C types
import
libc
::
size_t
;
import
comm
=
core
::
comm
;
import
ptr
::
to_unsafe_ptr
;
use
libc
::
size_t
;
use
comm
=
core
::
comm
;
use
ptr
::
to_unsafe_ptr
;
// libuv struct mappings
type
uv_ip4_addr
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录