Skip to content

Commit 0df2569

Browse files
authored
Merge pull request #59 from silverpill/key-ex-error
Implement std::error::Error for SimpleKeyExtractionError
2 parents 5c5458b + fa42dbc commit 0df2569

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/key_extractor.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use actix_web::{HttpResponse, HttpResponseBuilder, ResponseError};
44
use governor::clock::{Clock, DefaultClock, QuantaInstant};
55
use governor::NotUntil;
66

7+
use std::error::Error;
78
use std::fmt::{Debug, Display};
89
use std::{hash::Hash, net::IpAddr};
910

@@ -195,6 +196,8 @@ impl<T: Display + Debug> Display for SimpleKeyExtractionError<T> {
195196
}
196197
}
197198

199+
impl<T: Display + Debug> Error for SimpleKeyExtractionError<T> {}
200+
198201
impl<T: Display + Debug> ResponseError for SimpleKeyExtractionError<T> {
199202
fn status_code(&self) -> StatusCode {
200203
self.status_code

0 commit comments

Comments
 (0)