Skip to content

Commit d2988b8

Browse files
committed
StrBuf -> String
1 parent 9219dc4 commit d2988b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

datetime.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,19 +292,19 @@ mod tests {
292292
use time::{Timespec, strptime};
293293
use super::DateTime;
294294

295-
fn time_str<T: super::Time>(t: T) -> StrBuf {
295+
fn time_str<T: super::Time>(t: T) -> String {
296296
let tm = t.tm();
297297
format_strbuf!("{}{}", tm.strftime("%H:%M:%S"), if tm.tm_nsec != 0 { format_strbuf!("{:09i}", tm.tm_nsec as int) } else { "".to_strbuf() })
298298

299299
}
300300

301-
fn date_str<T: super::Date>(t: T) -> StrBuf {
301+
fn date_str<T: super::Date>(t: T) -> String {
302302
let tm = t.tm();
303303
tm.strftime("%Y-%m-%d")
304304

305305
}
306306

307-
fn datetime_str<T: super::DateTime>(t: T) -> StrBuf {
307+
fn datetime_str<T: super::DateTime>(t: T) -> String {
308308
let tm = t.tm();
309309
format_strbuf!("{}{}", tm.strftime("%Y-%m-%d %H:%M:%S"), if tm.tm_nsec != 0 { format_strbuf!("{:09i}", tm.tm_nsec as int) } else { "".to_strbuf() })
310310

@@ -356,7 +356,7 @@ mod tests {
356356
test_date(2147483647_i32);
357357
}
358358

359-
fn timespec_from_str(ds: &str) -> Result<Timespec, StrBuf> {
359+
fn timespec_from_str(ds: &str) -> Result<Timespec, String> {
360360
match strptime(ds, "%Y-%m-%d %H:%M:%S") {
361361
Ok(ref tm) => {
362362
let ndt: Timespec = ::DateTime::from_tm(tm);

0 commit comments

Comments
 (0)