mrsbfh

Matrix-Rust-SDK-Bot-Framework-Helper
git clone git://archive.git.mtrnord.blog/MTRNord/mrsbfh.git
Log | Files | Refs | README

commit 08fa34eb61b2f72f15d58690fbbe6a04938aa2d5
parent f6b0213517c3a470448833c620559bdafee30c86
Author: donicrosby <donicrosby1995@gmail.com>
Date:   Sat, 23 Oct 2021 13:43:32 -0400

Build using lazy_static

Diffstat:
Mexample-bot/Cargo.toml | 2+-
Mexample-bot/src/commands/hello_world.rs | 2+-
Mexample-bot/src/matrix/sync.rs | 4+++-
3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/example-bot/Cargo.toml b/example-bot/Cargo.toml @@ -16,7 +16,7 @@ serde = "1.0" tracing = "0.1" tracing-subscriber = "0.2" tracing-futures = "0.2.4" -tokio = { version = "1", features = ["full"] } +tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "macros"] } clap = "=3.0.0-beta.2" clap_derive = "=3.0.0-beta.2" async-trait = "0.1.41" diff --git a/example-bot/src/commands/hello_world.rs b/example-bot/src/commands/hello_world.rs @@ -1,8 +1,8 @@ use crate::config::Config; use crate::errors::Error; use matrix_sdk::events::{room::message::MessageEventContent, AnyMessageEventContent}; -use mrsbfh::commands::command; use matrix_sdk::Client; +use mrsbfh::commands::command; #[command(help = "`!hello_world` - Prints \"hello world\".")] pub async fn hello_world<'a>( diff --git a/example-bot/src/matrix/sync.rs b/example-bot/src/matrix/sync.rs @@ -6,8 +6,10 @@ use matrix_sdk::{ room::member::MemberEventContent, room::message::MessageEventContent, StrippedStateEvent, SyncMessageEvent, }, - Client, EventHandler, room::Room, + room::Room, + Client, EventHandler, }; +use mrsbfh::lazy_static; use tokio::sync::mpsc; use tracing::*;