Make `App::configure` take an `FnOnce`

This commit is contained in:
Nikolai Vazquez 2019-05-07 15:40:03 +02:00
parent a17ff492a1
commit 4fde87aba3
1 changed files with 1 additions and 1 deletions

View File

@ -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);