network: clarify comment on Default for handshake::Builder

Co-authored-by: Jane Lusby <jlusby42@gmail.com>
This commit is contained in:
Henry de Valence 2020-09-01 12:44:35 -07:00
parent fddba7a336
commit f91b91b6d8
1 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,9 @@ where
{
/// Create a builder that configures a [`Handshake`] service.
pub fn builder() -> Builder<S> {
// can't derive Builder::default without a bound on S :(
// We don't derive `Default` because the derive inserts a `where S:
// Default` bound even though `Option<S>` implements `Default` even if
// `S` does not.
Builder {
config: None,
inbound_service: None,