Skip to content

Commit

Permalink
refactor: refactoring tree traversal for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
wllfaria committed Apr 18, 2024
1 parent d667951 commit a6e2e2f
Show file tree
Hide file tree
Showing 3 changed files with 234 additions and 122 deletions.
6 changes: 3 additions & 3 deletions httpretty/src/schema/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub struct Schema {
pub path: PathBuf,
}

#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Clone)]
#[serde(untagged)]
pub enum RequestKind {
Single(Request),
Expand All @@ -26,14 +26,14 @@ impl RequestKind {
}
}

#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Clone)]
pub struct Request {
pub method: String,
pub name: String,
pub uri: String,
}

#[derive(Debug, Serialize, Deserialize, PartialEq, Clone)]
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, Hash, Clone)]
pub struct Directory {
pub name: String,
pub requests: Vec<RequestKind>,
Expand Down
Loading

0 comments on commit a6e2e2f

Please sign in to comment.