From 42aed6bde2fb05a262e21334656cdf91f51744dd Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 27 May 2014 20:44:58 -0700 Subject: std: Remove format_strbuf!() This was only ever a transitionary macro. --- src/libterm/terminfo/parm.rs | 8 +++----- src/libterm/terminfo/parser/compiled.rs | 8 +++----- src/libterm/terminfo/searcher.rs | 4 ++-- 3 files changed, 8 insertions(+), 12 deletions(-) (limited to 'src/libterm') diff --git a/src/libterm/terminfo/parm.rs b/src/libterm/terminfo/parm.rs index db9509a9dd2..3da8d7672f5 100644 --- a/src/libterm/terminfo/parm.rs +++ b/src/libterm/terminfo/parm.rs @@ -281,9 +281,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables) ';' => (), _ => { - return Err(format_strbuf!("unrecognized format \ - option {}", - cur)) + return Err(format!("unrecognized format option {}", cur)) } } }, @@ -549,8 +547,8 @@ fn format(val: Param, op: FormatOp, flags: Flags) -> Result ,String> { s } _ => { - return Err(format_strbuf!("non-string on stack with %{}", - op.to_char())) + return Err(format!("non-string on stack with %{}", + op.to_char())) } } } diff --git a/src/libterm/terminfo/parser/compiled.rs b/src/libterm/terminfo/parser/compiled.rs index 1a42addb4bd..b155753191c 100644 --- a/src/libterm/terminfo/parser/compiled.rs +++ b/src/libterm/terminfo/parser/compiled.rs @@ -164,7 +164,7 @@ pub fn parse(file: &mut io::Reader, longnames: bool) macro_rules! try( ($e:expr) => ( match $e { Ok(e) => e, - Err(e) => return Err(format_strbuf!("{}", e)) + Err(e) => return Err(format!("{}", e)) } ) ) @@ -185,10 +185,8 @@ pub fn parse(file: &mut io::Reader, longnames: bool) // Check magic number let magic = try!(file.read_le_u16()); if magic != 0x011A { - return Err(format_strbuf!("invalid magic number: expected {:x} but \ - found {:x}", - 0x011A, - magic as uint)); + return Err(format!("invalid magic number: expected {:x} but found {:x}", + 0x011A, magic as uint)); } let names_bytes = try!(file.read_le_i16()) as int; diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs index 84f0a4e3565..6b8ebb670e7 100644 --- a/src/libterm/terminfo/searcher.rs +++ b/src/libterm/terminfo/searcher.rs @@ -81,11 +81,11 @@ pub fn open(term: &str) -> Result { Some(x) => { match File::open(x) { Ok(file) => Ok(file), - Err(e) => Err(format_strbuf!("error opening file: {}", e)), + Err(e) => Err(format!("error opening file: {}", e)), } } None => { - Err(format_strbuf!("could not find terminfo entry for {}", term)) + Err(format!("could not find terminfo entry for {}", term)) } } } -- cgit 1.4.1-3-g733a5