diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2013-10-21 13:08:31 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2013-10-22 08:09:56 -0700 |
| commit | daf5f5a4d10513ff42e79fa7ef8819b170f3a13d (patch) | |
| tree | 7a07a79c43e02debcc6bbb33d90a5e41b70119e6 /src/libstd/rt/io/file.rs | |
| parent | 15a6bdebab4e7b811b9a902e3f8ed225c59af06e (diff) | |
Drop the '2' suffix from logging macros
Who doesn't like a massive renaming?
Diffstat (limited to 'src/libstd/rt/io/file.rs')
| -rw-r--r-- | src/libstd/rt/io/file.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libstd/rt/io/file.rs b/src/libstd/rt/io/file.rs index 39c3c5692f8..a5d593d2454 100644 --- a/src/libstd/rt/io/file.rs +++ b/src/libstd/rt/io/file.rs @@ -59,7 +59,7 @@ use path::Path; /// }).inside { /// let stream = match open(p, Create, ReadWrite) { /// Some(s) => s, -/// None => fail2!("whoops! I'm sure this raised, anyways.."); +/// None => fail!("whoops! I'm sure this raised, anyways.."); /// } /// // do some stuff with that stream /// @@ -223,7 +223,7 @@ pub fn rmdir<P: PathLike>(path: &P) { /// }).inside { /// let info = match stat(p) { /// Some(s) => s, -/// None => fail2!("whoops! I'm sure this raised, anyways.."); +/// None => fail!("whoops! I'm sure this raised, anyways.."); /// } /// if stat.is_file { /// // just imagine the possibilities ... @@ -271,7 +271,7 @@ pub fn stat<P: PathLike>(path: &P) -> Option<FileStat> { /// else { cb(entry); } /// } /// } -/// else { fail2!("nope"); } +/// else { fail!("nope"); } /// } /// /// # Errors @@ -596,7 +596,7 @@ impl FileInfo for Path { } /// else { cb(entry); } /// } /// } -/// else { fail2!("nope"); } +/// else { fail!("nope"); } /// } /// ``` pub trait DirectoryInfo : FileSystemInfo { @@ -713,7 +713,7 @@ mod test { let mut read_stream = open(filename, Open, Read).unwrap(); let mut read_buf = [0, .. 1028]; let read_str = match read_stream.read(read_buf).unwrap() { - -1|0 => fail2!("shouldn't happen"), + -1|0 => fail!("shouldn't happen"), n => str::from_utf8(read_buf.slice_to(n)) }; assert!(read_str == message.to_owned()); @@ -881,7 +881,7 @@ mod test { } let stat_res = match stat(filename) { Some(s) => s, - None => fail2!("shouldn't happen") + None => fail!("shouldn't happen") }; assert!(stat_res.is_file); unlink(filename); @@ -895,7 +895,7 @@ mod test { mkdir(filename); let stat_res = match stat(filename) { Some(s) => s, - None => fail2!("shouldn't happen") + None => fail!("shouldn't happen") }; assert!(stat_res.is_dir); rmdir(filename); @@ -964,7 +964,7 @@ mod test { r.read(mem); let read_str = str::from_utf8(mem); let expected = match n { - None|Some("") => fail2!("really shouldn't happen.."), + None|Some("") => fail!("really shouldn't happen.."), Some(n) => prefix+n }; assert!(expected == read_str); @@ -972,7 +972,7 @@ mod test { f.unlink(); } }, - None => fail2!("shouldn't happen") + None => fail!("shouldn't happen") } dir.rmdir(); } |
