From b444d23b3afc288a26e7621cb3e78dab31f7ba3c Mon Sep 17 00:00:00 2001 From: Paul Peregud Date: Thu, 22 Dec 2016 16:15:26 +0100 Subject: [PATCH] code example: do start before register_protocol (#3947) --- util/network/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/network/src/lib.rs b/util/network/src/lib.rs index 8d85731b0..a78199a48 100644 --- a/util/network/src/lib.rs +++ b/util/network/src/lib.rs @@ -45,8 +45,8 @@ //! //! fn main () { //! let mut service = NetworkService::new(NetworkConfiguration::new_local()).expect("Error creating network service"); -//! service.register_protocol(Arc::new(MyHandler), *b"myp", 1, &[1u8]); //! service.start().expect("Error starting service"); +//! service.register_protocol(Arc::new(MyHandler), *b"myp", 1, &[1u8]); //! //! // Wait for quit condition //! // ...