From 5fb254695b4db9af3d8e33577fae28ae9f7006c5 Mon Sep 17 00:00:00 2001 From: Patrick Walton Date: Fri, 31 May 2013 15:17:22 -0700 Subject: Remove all uses of `pub impl`. rs=style --- src/libstd/path.rs | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/libstd/path.rs') diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 9eb7b54f009..a551b9bf3c0 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -308,8 +308,8 @@ mod stat { } -pub impl Path { - fn stat(&self) -> Option { +impl Path { + pub fn stat(&self) -> Option { unsafe { do str::as_c_str(self.to_str()) |buf| { let mut st = stat::arch::default_stat(); @@ -322,7 +322,7 @@ pub impl Path { } #[cfg(unix)] - fn lstat(&self) -> Option { + pub fn lstat(&self) -> Option { unsafe { do str::as_c_str(self.to_str()) |buf| { let mut st = stat::arch::default_stat(); @@ -334,21 +334,21 @@ pub impl Path { } } - fn exists(&self) -> bool { + pub fn exists(&self) -> bool { match self.stat() { None => false, Some(_) => true, } } - fn get_size(&self) -> Option { + pub fn get_size(&self) -> Option { match self.stat() { None => None, Some(ref st) => Some(st.st_size as i64), } } - fn get_mode(&self) -> Option { + pub fn get_mode(&self) -> Option { match self.stat() { None => None, Some(ref st) => Some(st.st_mode as uint), @@ -359,8 +359,8 @@ pub impl Path { #[cfg(target_os = "freebsd")] #[cfg(target_os = "linux")] #[cfg(target_os = "macos")] -pub impl Path { - fn get_atime(&self) -> Option<(i64, int)> { +impl Path { + pub fn get_atime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -370,7 +370,7 @@ pub impl Path { } } - fn get_mtime(&self) -> Option<(i64, int)> { + pub fn get_mtime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -380,7 +380,7 @@ pub impl Path { } } - fn get_ctime(&self) -> Option<(i64, int)> { + pub fn get_ctime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -393,8 +393,8 @@ pub impl Path { #[cfg(target_os = "freebsd")] #[cfg(target_os = "macos")] -pub impl Path { - fn get_birthtime(&self) -> Option<(i64, int)> { +impl Path { + pub fn get_birthtime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -406,8 +406,8 @@ pub impl Path { } #[cfg(target_os = "win32")] -pub impl Path { - fn get_atime(&self) -> Option<(i64, int)> { +impl Path { + pub fn get_atime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -416,7 +416,7 @@ pub impl Path { } } - fn get_mtime(&self) -> Option<(i64, int)> { + pub fn get_mtime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { @@ -425,7 +425,7 @@ pub impl Path { } } - fn get_ctime(&self) -> Option<(i64, int)> { + pub fn get_ctime(&self) -> Option<(i64, int)> { match self.stat() { None => None, Some(ref st) => { -- cgit 1.4.1-3-g733a5