Skip to content

Commit

Permalink
Move struct inside test function where it only used
Browse files Browse the repository at this point in the history
  • Loading branch information
Mingun committed Jun 5, 2022
1 parent 4b67205 commit f322891
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/serde-migrated.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ use serde::{Deserialize, Serialize};

use pretty_assertions::assert_eq;

#[derive(PartialEq, Debug, Serialize, Deserialize)]
enum Animal {
Dog,
Frog(String),
Ant(Simple),
Cat { age: usize, name: String },
}

#[derive(PartialEq, Debug, Serialize, Deserialize)]
struct Simple {
a: (),
Expand Down Expand Up @@ -126,7 +118,15 @@ fn test_parse_string_not_trim() {
#[test]
#[ignore] // FIXME
fn test_parse_enum() {
use self::Animal::*;
use Animal::*;

#[derive(PartialEq, Debug, Serialize, Deserialize)]
enum Animal {
Dog,
Frog(String),
Ant(Simple),
Cat { age: usize, name: String },
}

test_parse_ok(&[
("<Animal xsi:type=\"Dog\"/>", Dog),
Expand Down

0 comments on commit f322891

Please sign in to comment.