Replace usage of String::from_str with String:from
This commit is contained in:
parent
2ff42435c2
commit
c160192f5f
29 changed files with 105 additions and 106 deletions
|
@ -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",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue