Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 8f7f88b

Browse files
committed
Fix compat with 1.0.0
Closes #171
1 parent 8f56ad5 commit 8f7f88b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: rust
22
rust:
3+
- 1.0.0
34
- stable
45
- beta
56
- nightly

src/json.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,12 +331,22 @@ pub enum DecoderError {
331331
EOF,
332332
}
333333

334-
#[derive(Copy, PartialEq, Debug)]
334+
#[derive(Copy, Debug)]
335335
pub enum EncoderError {
336336
FmtError(fmt::Error),
337337
BadHashmapKey,
338338
}
339339

340+
impl PartialEq for EncoderError {
341+
fn eq(&self, other: &EncoderError) -> bool {
342+
match (*self, *other) {
343+
(EncoderError::FmtError(_), EncoderError::FmtError(_)) => true,
344+
(EncoderError::BadHashmapKey, EncoderError::BadHashmapKey) => true,
345+
_ => false,
346+
}
347+
}
348+
}
349+
340350
impl Clone for EncoderError {
341351
fn clone(&self) -> Self { *self }
342352
}

0 commit comments

Comments
 (0)