Closed TobiasDeBruijn closed 2 years ago
Not sure why those other commits were referenced, as those were already implemented in a previous PR :thinking: If wanted I can open a new PR, hopefully without those commits referenced
Looks good to me. Thanks!
This PR adds several
const fn
's forGovernorConfigBuilder<PeerIpKeyExtractor>
, namely:const_default
const_period
const_per_second
const_per_millisecond
const_per_nanosecond
const_burst_size
I was not able to create aconst fn
formethods
,key_extractor
andfinish
. Theconst fn
's were not added in the already existingimpl
due to trait bounds other thanSized
on const fn parameters are unstable. The other three methods do not have a const implementation because involved items (e.g.Vec
) requiresDrop
,Option::unwrap
, or uses external functions which are notconst
.The implementation of
GovernorConfigBuilder<PeerIpKeyExtractor>::default()
now callsconst_default
Thanks