Skip to content

Commit 7b23f0f

Browse files
committed
refactor: clean up from the debug and dead code
1 parent 7f566be commit 7b23f0f

File tree

3 files changed

+0
-41
lines changed

3 files changed

+0
-41
lines changed

examples/presence_state.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@ struct State {
88
flag: bool,
99
}
1010

11-
#[allow(dead_code)]
12-
#[derive(Debug, serde::Serialize)]
13-
struct State2 {
14-
is_doing: String,
15-
business: String,
16-
}
17-
1811
#[tokio::main]
1912
async fn main() -> Result<(), Box<dyn snafu::Error>> {
2013
// let publish_key = env::var("SDK_PUB_KEY")?;

examples/subscribe.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ struct Message {
2121

2222
#[tokio::main]
2323
async fn main() -> Result<(), Box<dyn snafu::Error>> {
24-
env_logger::init();
2524
let publish_key = env::var("SDK_PUB_KEY")?;
2625
let subscribe_key = env::var("SDK_SUB_KEY")?;
2726

@@ -105,17 +104,6 @@ async fn main() -> Result<(), Box<dyn snafu::Error>> {
105104
.files_stream()
106105
.for_each(|file| async move { println!("(b) file: {:?}", file) }),
107106
);
108-
// tokio::time::sleep(tokio::time::Duration::from_secs(2)).await;
109-
println!("\nWaiting for message");
110-
//
111-
// println!("\nPublish a message:");
112-
//
113-
// pubnub
114-
// .publish_message("{\"event\":\"flag_changed\",\"timestamp\":
115-
// 1758130367173}") .channel("my_channel")
116-
// .execute()
117-
// .await?;
118-
// println!("\nDone!");
119107

120108
// Sleep for a minute. Now you can send messages to the channels
121109
// "my_channel" and "other_channel" and see them printed in the console.

src/core/event_engine/effect_dispatcher.rs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,6 @@ mod should {
261261
}
262262
}
263263

264-
#[allow(dead_code)]
265-
#[derive(Clone)]
266-
struct TestRuntime {}
267-
268-
#[async_trait::async_trait]
269-
impl Runtime for TestRuntime {
270-
fn spawn<R>(&self, _future: impl Future<Output = R> + Send + 'static)
271-
where
272-
R: Send + 'static,
273-
{
274-
// Do nothing.
275-
}
276-
277-
async fn sleep(self, _delay: u64) {
278-
// Do nothing.
279-
}
280-
281-
async fn sleep_microseconds(self, _delay: u64) {
282-
// Do nothing.
283-
}
284-
}
285-
286264
#[test]
287265
fn create_not_managed_effect() {
288266
let (_tx, rx) = async_channel::bounded::<TestInvocation>(5);

0 commit comments

Comments
 (0)