Add dummy Debug instance to authority discovery service. (#9156)

* Add dummy Debug instance to AuthorityDiscoveryService.

* Update client/authority-discovery/src/service.rs

More idiomatic print

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>

Co-authored-by: Pierre Krieger <pierre.krieger1708@gmail.com>
This commit is contained in:
Robert Klotzner
2021-06-22 15:24:33 +02:00
committed by GitHub
parent 8be60821bb
commit d35d69a475
@@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
use std::fmt::Debug;
use crate::ServicetoWorkerMsg;
use futures::channel::{mpsc, oneshot};
@@ -30,6 +32,12 @@ pub struct Service {
to_worker: mpsc::Sender<ServicetoWorkerMsg>,
}
impl Debug for Service {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_tuple("AuthorityDiscoveryService").finish()
}
}
/// A [`Service`] allows to interact with a [`crate::Worker`], e.g. by querying the
/// [`crate::Worker`]'s local address cache for a given [`AuthorityId`].
impl Service {