From 003ce502350ed1e374b740ee2d719e500c165615 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Thu, 30 Jan 2014 00:46:37 +1100 Subject: std: rename fmt::Default to `Show`. This is a better name with which to have a #[deriving] mode. Decision in: https://github.com/mozilla/rust/wiki/Meeting-weekly-2014-01-28 --- src/libstd/path/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libstd/path') diff --git a/src/libstd/path/mod.rs b/src/libstd/path/mod.rs index c5482811a94..86f96a1075b 100644 --- a/src/libstd/path/mod.rs +++ b/src/libstd/path/mod.rs @@ -198,14 +198,14 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// Converts the Path into an owned byte vector fn into_vec(self) -> ~[u8]; - /// Returns an object that implements `fmt::Default` for printing paths + /// Returns an object that implements `Show` for printing paths /// /// This will print the equivalent of `to_display_str()` when used with a {} format parameter. fn display<'a>(&'a self) -> Display<'a, Self> { Display{ path: self, filename: false } } - /// Returns an object that implements `fmt::Default` for printing filenames + /// Returns an object that implements `Show` for printing filenames /// /// This will print the equivalent of `to_filename_display_str()` when used with a {} /// format parameter. If there is no filename, nothing will be printed. @@ -532,7 +532,7 @@ pub struct Display<'a, P> { priv filename: bool } -impl<'a, P: GenericPath> fmt::Default for Display<'a, P> { +impl<'a, P: GenericPath> fmt::Show for Display<'a, P> { fn fmt(d: &Display

, f: &mut fmt::Formatter) { d.with_str(|s| f.pad(s)) } -- cgit 1.4.1-3-g733a5