Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
int
Rust
提交
b4f5e78b
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,发现更多精彩内容 >>
提交
b4f5e78b
编写于
3月 15, 2015
作者:
B
bors
浏览文件
操作
浏览文件
下载
差异文件
Auto merge of #23387 - Manishearth:rollup, r=Manishearth
- Successful merges: #23375, #23379, #23382, #23384 - Failed merges:
上级
95018eec
9f1240b6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
12 addition
and
25 deletion
+12
-25
src/libstd/env.rs
src/libstd/env.rs
+1
-1
src/libstd/io/mod.rs
src/libstd/io/mod.rs
+0
-4
src/libstd/io/stdio.rs
src/libstd/io/stdio.rs
+9
-18
src/libstd/path.rs
src/libstd/path.rs
+2
-2
未找到文件。
src/libstd/env.rs
浏览文件 @
b4f5e78b
...
...
@@ -452,7 +452,7 @@ pub fn get_exit_status() -> i32 {
EXIT_STATUS
.load
(
Ordering
::
SeqCst
)
as
i32
}
/// An iterator over the arguments of a process, yielding a
n
`String` value
/// An iterator over the arguments of a process, yielding a `String` value
/// for each argument.
///
/// This structure is created through the `std::env::args` method.
...
...
src/libstd/io/mod.rs
浏览文件 @
b4f5e78b
...
...
@@ -9,10 +9,6 @@
// except according to those terms.
//! Traits, helpers, and type definitions for core I/O functionality.
//!
//! > **NOTE**: This module is very much a work in progress and is under active
//! > development. At this time it is still recommended to use the `old_io`
//! > module while the details of this module shake out.
#![stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
...
...
src/libstd/io/stdio.rs
浏览文件 @
b4f5e78b
...
...
@@ -21,20 +21,20 @@
/// A handle to a raw instance of the standard input stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdin_raw` function.
pub
struct
StdinRaw
(
stdio
::
Stdin
);
/// the `std::io::stdi
o::stdi
n_raw` function.
struct
StdinRaw
(
stdio
::
Stdin
);
/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stdout_raw` function.
pub
struct
StdoutRaw
(
stdio
::
Stdout
);
/// the `std::io::std
io::std
out_raw` function.
struct
StdoutRaw
(
stdio
::
Stdout
);
/// A handle to a raw instance of the standard output stream of this process.
///
/// This handle is not synchronized or buffered in any fashion. Constructed via
/// the `std::io::stderr_raw` function.
pub
struct
StderrRaw
(
stdio
::
Stderr
);
/// the `std::io::std
io::std
err_raw` function.
struct
StderrRaw
(
stdio
::
Stderr
);
/// Construct a new raw handle to the standard input of this process.
///
...
...
@@ -43,7 +43,7 @@
/// handles is **not** available to raw handles returned from this function.
///
/// The returned handle has no external synchronization or buffering.
pub
fn
stdin_raw
()
->
StdinRaw
{
StdinRaw
(
stdio
::
Stdin
::
new
())
}
fn
stdin_raw
()
->
StdinRaw
{
StdinRaw
(
stdio
::
Stdin
::
new
())
}
/// Construct a new raw handle to the standard input stream of this process.
///
...
...
@@ -54,7 +54,7 @@ pub fn stdin_raw() -> StdinRaw { StdinRaw(stdio::Stdin::new()) }
///
/// The returned handle has no external synchronization or buffering layered on
/// top.
pub
fn
stdout_raw
()
->
StdoutRaw
{
StdoutRaw
(
stdio
::
Stdout
::
new
())
}
fn
stdout_raw
()
->
StdoutRaw
{
StdoutRaw
(
stdio
::
Stdout
::
new
())
}
/// Construct a new raw handle to the standard input stream of this process.
///
...
...
@@ -63,7 +63,7 @@ pub fn stdout_raw() -> StdoutRaw { StdoutRaw(stdio::Stdout::new()) }
///
/// The returned handle has no external synchronization or buffering layered on
/// top.
pub
fn
stderr_raw
()
->
StderrRaw
{
StderrRaw
(
stdio
::
Stderr
::
new
())
}
fn
stderr_raw
()
->
StderrRaw
{
StderrRaw
(
stdio
::
Stderr
::
new
())
}
impl
Read
for
StdinRaw
{
fn
read
(
&
mut
self
,
buf
:
&
mut
[
u8
])
->
io
::
Result
<
usize
>
{
self
.0
.read
(
buf
)
}
...
...
@@ -109,9 +109,6 @@ pub struct StdinLock<'a> {
/// The `Read` trait is implemented for the returned value but the `BufRead`
/// trait is not due to the global nature of the standard input stream. The
/// locked version, `StdinLock`, implements both `Read` and `BufRead`, however.
///
/// To avoid locking and buffering altogether, it is recommended to use the
/// `stdin_raw` constructor.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
fn
stdin
()
->
Stdin
{
static
INSTANCE
:
Lazy
<
Mutex
<
BufReader
<
StdinRaw
>>>
=
lazy_init!
(
stdin_init
);
...
...
@@ -224,9 +221,6 @@ pub struct StdoutLock<'a> {
/// provided via the `lock` method.
///
/// The returned handle implements the `Write` trait.
///
/// To avoid locking and buffering altogether, it is recommended to use the
/// `stdout_raw` constructor.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
fn
stdout
()
->
Stdout
{
static
INSTANCE
:
Lazy
<
Mutex
<
LineWriter
<
StdoutRaw
>>>
=
lazy_init!
(
stdout_init
);
...
...
@@ -297,9 +291,6 @@ pub struct StderrLock<'a> {
/// this function. No handles are buffered, however.
///
/// The returned handle implements the `Write` trait.
///
/// To avoid locking altogether, it is recommended to use the `stderr_raw`
/// constructor.
#[stable(feature
=
"rust1"
,
since
=
"1.0.0"
)]
pub
fn
stderr
()
->
Stderr
{
static
INSTANCE
:
Lazy
<
Mutex
<
StderrRaw
>>
=
lazy_init!
(
stderr_init
);
...
...
src/libstd/path.rs
浏览文件 @
b4f5e78b
...
...
@@ -86,8 +86,8 @@
//!
//! * Occurrences of `.` are normalized away, *except* if they are at
//! the beginning of the path (in which case they are often meaningful
//! in terms of path searching). So, for
e
xample, `a/./b`, `a/b/`,
//! `/a/b/.` and `a/b` all
ah
ve components `a` and `b`, but `./a/b`
//! in terms of path searching). So, for
e
xample, `a/./b`, `a/b/`,
//! `/a/b/.` and `a/b` all
ha
ve components `a` and `b`, but `./a/b`
//! has a leading current directory component.
//!
//! No other normalization takes place by default. In particular,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录