Skip to content

Commit a94ca77

Browse files
feat: derive Debug for all public types (#293)
Co-authored-by: ADD-SP <add_sp@outlook.com>
1 parent d554e9d commit a94ca77

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/context.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use crate::schema::Schema;
33
use fnv::FnvHashMap;
44
use uuid::Uuid;
55

6+
#[derive(Debug)]
67
pub struct Match {
78
pub uuid: Uuid,
89
pub matches: FnvHashMap<String, Value>,
@@ -25,6 +26,7 @@ impl Default for Match {
2526
}
2627
}
2728

29+
#[derive(Debug)]
2830
pub struct Context<'a> {
2931
schema: &'a Schema,
3032
values: FnvHashMap<String, Vec<Value>>,

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![deny(warnings, missing_debug_implementations)]
12
/*!
23
This crate provides a powerful rule based matching engine that can match a set of routes
34
against dynamic input value efficiently.

src/router.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ use crate::semantics::{FieldCounter, Validate};
77
use std::collections::{BTreeMap, HashMap};
88
use uuid::Uuid;
99

10-
#[derive(PartialEq, Eq, PartialOrd, Ord)]
10+
#[derive(Debug, PartialEq, Eq, PartialOrd, Ord)]
1111
struct MatcherKey(usize, Uuid);
1212

13+
#[derive(Debug)]
1314
pub struct Router<'a> {
1415
schema: &'a Schema,
1516
matchers: BTreeMap<MatcherKey, Expression>,

src/schema.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::ast::Type;
22
use std::collections::HashMap;
33

4-
#[derive(Default)]
4+
#[derive(Debug, Default)]
55
pub struct Schema {
66
fields: HashMap<String, Type>,
77
}

0 commit comments

Comments
 (0)