mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Remove some unnecessary impls from json
This commit is contained in:
parent
18ca312984
commit
5b41df4ca0
@ -1195,10 +1195,6 @@ impl ToJson for Json {
|
|||||||
fn to_json(&self) -> Json { (*self).clone() }
|
fn to_json(&self) -> Json { (*self).clone() }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToJson for @Json {
|
|
||||||
fn to_json(&self) -> Json { (**self).to_json() }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl ToJson for int {
|
impl ToJson for int {
|
||||||
fn to_json(&self) -> Json { Number(*self as f64) }
|
fn to_json(&self) -> Json { Number(*self as f64) }
|
||||||
}
|
}
|
||||||
@ -1259,10 +1255,6 @@ impl ToJson for ~str {
|
|||||||
fn to_json(&self) -> Json { String((*self).clone()) }
|
fn to_json(&self) -> Json { String((*self).clone()) }
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ToJson for @~str {
|
|
||||||
fn to_json(&self) -> Json { String((**self).clone()) }
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<A:ToJson,B:ToJson> ToJson for (A, B) {
|
impl<A:ToJson,B:ToJson> ToJson for (A, B) {
|
||||||
fn to_json(&self) -> Json {
|
fn to_json(&self) -> Json {
|
||||||
match *self {
|
match *self {
|
||||||
|
Loading…
Reference in New Issue
Block a user