protocols/gossipsub: Fix elided lifetime on gossipsub config builder (#2409)

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Ibiyemi Abiodun
2021-12-30 14:23:41 -05:00
committed by GitHub
parent b4468d7500
commit 3749dd56f1
2 changed files with 4 additions and 1 deletions

View File

@ -9,9 +9,12 @@
- Improve bandwidth performance by tracking IWANTs and reducing duplicate sends
(see [PR 2327]).
- Fix `GossipsubConfigBuilder::build()` requiring `&self` to live for `'static` (see [PR 2409])
[PR 2346]: https://github.com/libp2p/rust-libp2p/pull/2346
[PR 2339]: https://github.com/libp2p/rust-libp2p/pull/2339
[PR 2327]: https://github.com/libp2p/rust-libp2p/pull/2327
[PR 2409]: https://github.com/libp2p/rust-libp2p/pull/2409
# 0.34.0 [2021-11-16]

View File

@ -750,7 +750,7 @@ impl GossipsubConfigBuilder {
}
/// Constructs a [`GossipsubConfig`] from the given configuration and validates the settings.
pub fn build(&self) -> Result<GossipsubConfig, &str> {
pub fn build(&self) -> Result<GossipsubConfig, &'static str> {
// check all constraints on config
if self.config.max_transmit_size < 100 {