1
Fork 0

std: Rename Writer::write to Writer::write_all

In preparation for upcoming changes to the `Writer` trait (soon to be called
`Write`) this commit renames the current `write` method to `write_all` to match
the semantics of the upcoming `write_all` method. The `write` method will be
repurposed to return a `usize` indicating how much data was written which
differs from the current `write` semantics. In order to head off as much
unintended breakage as possible, the method is being deprecated now in favor of
a new name.

[breaking-change]
This commit is contained in:
Alex Crichton 2015-01-23 10:46:14 -08:00
parent 3a07f859b8
commit 5d836cdf86
41 changed files with 229 additions and 226 deletions

View file

@ -626,7 +626,7 @@ fn render_sources(cx: &mut Context,
/// Writes the entire contents of a string to a destination, not attempting to
/// catch any errors.
fn write(dst: Path, contents: &[u8]) -> old_io::IoResult<()> {
File::create(&dst).write(contents)
File::create(&dst).write_all(contents)
}
/// Makes a directory on the filesystem, failing the task if an error occurs and