Skip to content

Commit

Permalink
Router struct implements Clone trait
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Oct 28, 2020
1 parent 1e8f58d commit d1f8ac1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ntex-router/CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## [0.3.8] - 2020-10-28

* Router struct implements Clone trait

## [0.3.7] - 2020-09-21

* Fix hex conversion helper
Expand Down
6 changes: 3 additions & 3 deletions ntex-router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ntex-router"
version = "0.3.7"
version = "0.3.8"
authors = ["ntex contributors <[email protected]>"]
description = "Path router"
keywords = ["ntex"]
Expand All @@ -17,8 +17,8 @@ path = "src/lib.rs"
default = ["http"]

[dependencies]
regex = "1.3.5"
serde = "1.0.105"
regex = "1.4.1"
serde = "1.0.116"
bytestring = "0.1.5"
log = "0.4.8"
http = { version = "0.2.1", optional = true }
Expand Down
1 change: 1 addition & 0 deletions ntex-router/src/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pub struct ResourceInfo {
}

/// Resource router.
#[derive(Clone)]
pub struct Router<T, U = ()> {
tree: Tree,
resources: Vec<(ResourceDef, T, Option<U>)>,
Expand Down
2 changes: 1 addition & 1 deletion ntex-router/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use super::path::PathItem;
use super::resource::{ResourceDef, Segment};
use super::{Resource, ResourcePath};

#[derive(Debug)]
#[derive(Debug, Clone)]
pub(super) struct Tree {
key: Vec<Segment>,
value: Vec<Value>,
Expand Down

0 comments on commit d1f8ac1

Please sign in to comment.