From 31bd6f6d064ac63d85d762a67767607b97a9e90e Mon Sep 17 00:00:00 2001 From: Dan Ballard Date: Sun, 31 Jul 2022 08:30:30 -0700 Subject: [PATCH] migrate to cwtch-imp --- Cargo.lock | 25 ++++++++++++++----------- Cargo.toml | 4 ++-- src/main.rs | 11 +++++------ 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6896195..74c7b0b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -55,6 +55,16 @@ dependencies = [ "typenum", ] +[[package]] +name = "cwtch-imp" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43f38e95ddcc77d53169fcc8fe0b6a7ba87bc6e0c5e5e70f0d9838ee9e1ecd72" +dependencies = [ + "chrono", + "libcwtch", +] + [[package]] name = "darling" version = "0.13.1" @@ -128,15 +138,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" -[[package]] -name = "imp" -version = "0.1.0" -dependencies = [ - "chrono", - "libcwtch", - "serde_json", -] - [[package]] name = "itoa" version = "1.0.1" @@ -151,7 +152,9 @@ checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "libcwtch" -version = "0.3.2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1dc37a50eff2066aec054e9c1616f3260a8531b31b5037a10bd0fa127f7f663f" dependencies = [ "chrono", "hex-literal", @@ -333,7 +336,7 @@ name = "update_bot" version = "0.1.0" dependencies = [ "chrono", - "imp", + "cwtch-imp", "libcwtch", "serde_json", ] diff --git a/Cargo.toml b/Cargo.toml index 8696538..5782691 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,8 +6,8 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libcwtch = {path = "../libcwtch-rs"} #"0.3.2" -imp = {path = "../imp"} +libcwtch = "0.4.0" +cwtch-imp = "0.2.0" serde_json = "1.0" chrono = "0.4.19" diff --git a/src/main.rs b/src/main.rs index ba4630a..f507395 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,17 +5,16 @@ use std::fs::read_dir; use std::path::{Path, PathBuf}; use std::thread; -use ::imp::imp; -use ::imp::behaviour; -use ::imp::behaviour::BehaviourBuilder; -use ::imp::behaviour::Behaviour; -use ::imp::imp::Imp; +use cwtch_imp::imp; +use cwtch_imp::behaviour; +use cwtch_imp::behaviour::BehaviourBuilder; +use cwtch_imp::behaviour::Behaviour; +use cwtch_imp::imp::Imp; use chrono::{DateTime, FixedOffset}; use libcwtch; use libcwtch::CwtchLib; use libcwtch::event::{ContactIdentity, ConversationID}; use libcwtch::structs::*; -use serde_json; const DIST_DIR: &str = "cwtch_dist"; const BOT_HOME: &str = "~/.cwtch/bots/update_bot";