From 5b0204f6b1ca722aaecc08ee2422418c3f86a457 Mon Sep 17 00:00:00 2001 From: Ivan Folgueira Bande Date: Mon, 23 Dec 2024 00:41:35 +0100 Subject: [PATCH] tic-tac-toe minor fixes --- examples/tic-tac-toe-gui/src/main.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/tic-tac-toe-gui/src/main.rs b/examples/tic-tac-toe-gui/src/main.rs index adeadcd..954c060 100644 --- a/examples/tic-tac-toe-gui/src/main.rs +++ b/examples/tic-tac-toe-gui/src/main.rs @@ -2,7 +2,7 @@ use eframe::egui; use serde::{Deserialize, Serialize}; use std::str::from_utf8; use std::sync::{Arc, Mutex}; -use std::time::{SystemTime, Duration}; +use std::time::Duration; use tokio::task; use tokio::sync::mpsc; @@ -90,16 +90,16 @@ impl TicTacToeApp { // Subscribe to desired topic using the relay protocol waku.relay_subscribe(&self.game_topic).await.expect("waku should subscribe"); - /// Example filter subscription. This is needed in edge nodes (resource-restricted devices) - /// Nodes usually use either relay or lightpush/filter protocols + // Example filter subscription. This is needed in edge nodes (resource-restricted devices) + // Nodes usually use either relay or lightpush/filter protocols // let ctopic = WakuContentTopic::new("waku", "2", "tictactoegame", Encoding::Proto); // let content_topics = vec![ctopic]; // waku.filter_subscribe(&self.game_topic, content_topics).await.expect("waku should subscribe"); - /// End filter example ---------------------------------------- + // End filter example ---------------------------------------- - /// Example to establish direct connection to a well-known node + // Example to establish direct connection to a well-known node // Connect to hard-coded node // let target_node_multi_addr = @@ -111,7 +111,7 @@ impl TicTacToeApp { // self.waku.connect(&target_node_multi_addr, None) // .expect("waku should connect to other node"); - /// End example direct connection + // End example direct connection TicTacToeApp { game_state: self.game_state, @@ -140,11 +140,11 @@ impl TicTacToeApp { dbg!(format!("message hash published: {}", msg_hash)); } - /// Example lightpush publish message. This is needed in edge nodes (resource-restricted devices) - /// Nodes usually use either relay or lightpush/filter protocols - /// + // Example lightpush publish message. This is needed in edge nodes (resource-restricted devices) + // Nodes usually use either relay or lightpush/filter protocols + // // self.waku.lightpush_publish_message(&message, &self.game_topic); - /// End example lightpush publish message ------------------------------- + // End example lightpush publish message } fn make_move(&mut self, row: usize, col: usize) {