Closed qnighy closed 5 years ago
Agreed! I'd like it to go in as well :-)
Hey, @qnighy, thank you for a contribution!
I'm a little busy today, so I'll review the changes tomorrow, but so far it looks okay to me.
Published as a 0.3.2
version, thanks once again!
Three constructor functions for
HttpAuthentication
only requiresF: FnMut
. However, the constructed instances are only usable whenF: Fn
. This is unfortunate for closures, since the passed closure will be inferred to be onlyFnMut
when it only captures immutably.Technically it's a breaking change, but as it's actually unusable without
F: Fn
, I'd think it's considered a bugfix. If this is unsuitable, I'll prepare another PR that introducesHttpAuthentication::with_fn2
etc.