1
Fork 0

Replace usage of String::from_str with String:from

This commit is contained in:
Simon Sapin 2015-06-08 16:55:35 +02:00
parent 2ff42435c2
commit c160192f5f
29 changed files with 105 additions and 106 deletions

View file

@ -457,7 +457,7 @@ fn spaces(wr: &mut fmt::Write, mut n: usize) -> EncodeResult {
fn fmt_number_or_null(v: f64) -> string::String {
match v.classify() {
Fp::Nan | Fp::Infinite => string::String::from_str("null"),
Fp::Nan | Fp::Infinite => string::String::from("null"),
_ if v.fract() != 0f64 => v.to_string(),
_ => v.to_string() + ".0",
}