mirror of
https://github.com/fafhrd91/actix-web
synced 2025-01-18 05:41:50 +01:00
Make App::configure
take an FnOnce
(#825)
This commit is contained in:
parent
a17ff492a1
commit
a77b0b054a
@ -128,7 +128,7 @@ where
|
|||||||
/// ```
|
/// ```
|
||||||
pub fn configure<F>(mut self, f: F) -> Self
|
pub fn configure<F>(mut self, f: F) -> Self
|
||||||
where
|
where
|
||||||
F: Fn(&mut ServiceConfig),
|
F: FnOnce(&mut ServiceConfig),
|
||||||
{
|
{
|
||||||
let mut cfg = ServiceConfig::new();
|
let mut cfg = ServiceConfig::new();
|
||||||
f(&mut cfg);
|
f(&mut cfg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user