mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 08:57:00 +02:00
remove box from predicates
This commit is contained in:
@@ -57,8 +57,8 @@ impl<S: 'static> Route<S> {
|
||||
/// # .finish();
|
||||
/// # }
|
||||
/// ```
|
||||
pub fn p(&mut self, p: Box<Predicate<S>>) -> &mut Self {
|
||||
self.preds.push(p);
|
||||
pub fn p<T: Predicate<S> + 'static>(&mut self, p: T) -> &mut Self {
|
||||
self.preds.push(Box::new(p));
|
||||
self
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user