mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
try parse Uri from request if parsed object not provided
This commit is contained in:
parent
d10987ff4e
commit
23cc695896
2 changed files with 14 additions and 6 deletions
|
|
@ -32,12 +32,12 @@ impl Request {
|
|||
|
||||
/// Add new record with `request` as key and `unix_timestamp` as value
|
||||
/// * replace with new value if `request` already exists
|
||||
pub fn set(&self, uri: &Uri) {
|
||||
pub fn set(&self, uri: Uri) {
|
||||
self.index.borrow_mut().insert(
|
||||
uri.to_str(),
|
||||
Value {
|
||||
unix_timestamp: DateTime::now_local().unwrap().to_unix(),
|
||||
uri: uri.clone(),
|
||||
uri,
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue