summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRomeo Disca <romeo.disca@gmail.com>2020-08-18 06:40:46 +0200
committerRomeo Disca <romeo.disca@gmail.com>2020-08-18 06:40:46 +0200
commita14cc3f38b67e6054bdbff8aff7c60967f342194 (patch)
treedab55097ece8372c757726a3a81c674710b80894
parentbfc63947702ffb3ca1dca6e8184f0998fb98ed13 (diff)
downloadflicbtn-a14cc3f38b67e6054bdbff8aff7c60967f342194.tar.gz
flicbtn-a14cc3f38b67e6054bdbff8aff7c60967f342194.tar.xz
refactor: change crate to lib
-rw-r--r--Cargo.lock22
-rw-r--r--Cargo.toml2
-rw-r--r--examples/ping.rs (renamed from src/main.rs)7
-rw-r--r--src/lib.rs9
4 files changed, 22 insertions, 18 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0e0402d..f9b2e50 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -45,6 +45,17 @@ dependencies = [
]
[[package]]
+name = "flicbtn"
+version = "0.1.0"
+dependencies = [
+ "bytes",
+ "futures",
+ "num_enum",
+ "regex",
+ "tokio",
+]
+
+[[package]]
name = "fnv"
version = "1.0.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -441,17 +452,6 @@ dependencies = [
]
[[package]]
-name = "simpleclient"
-version = "0.1.0"
-dependencies = [
- "bytes",
- "futures",
- "num_enum",
- "regex",
- "tokio",
-]
-
-[[package]]
name = "slab"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 77a14a5..69d3fc1 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,5 +1,5 @@
[package]
-name = "simpleclient"
+name = "flicbtn"
version = "0.1.0"
authors = ["Romeo Disca <romeo.disca@gmail.com>"]
edition = "2018"
diff --git a/src/main.rs b/examples/ping.rs
index dd068fe..4a6a7cb 100644
--- a/src/main.rs
+++ b/examples/ping.rs
@@ -1,15 +1,10 @@
-mod enums;
-mod events;
-mod commands;
-mod client;
use std::error::Error;
use std::time::Duration;
use std::sync::Arc;
-use client::*;
-use commands::Command;
+use flicbtn::*;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
diff --git a/src/lib.rs b/src/lib.rs
new file mode 100644
index 0000000..ba9a5f6
--- /dev/null
+++ b/src/lib.rs
@@ -0,0 +1,9 @@
+
+mod enums;
+mod events;
+mod commands;
+mod client;
+
+pub use client::*;
+pub use commands::Command;
+pub use events::Event; \ No newline at end of file