Skip to content

Commit 69677c1

Browse files
committed
Update examples
1 parent 52ef02b commit 69677c1

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ aio-sslv = ["tokio-openssl", "openssl/vendored"]
2626

2727
[dependencies]
2828
bytes = { version="1.0.1", optional=true }
29-
tokio = { version="1.5.0", features=["net", "io-util", "io-std"], optional=true }
29+
tokio = { version="1.7.1", features=["net", "io-util", "io-std"], optional=true }
3030
openssl = { version="0.10.35", optional=true }
31-
tokio-openssl = { version="0.6.1", optional=true }
31+
tokio-openssl = { version="0.6.2", optional=true }
3232
[package.metadata.docs.rs]
3333
all-features = true
3434
rustdoc-args = ["--cfg", "docsrs"]

examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[workspace]
2-
members = ["basic", "actions"]
2+
members = ["basic", "actions", "aio"]

examples/actions/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
skytable = { path = "../../" }
10+
# We use the `const-gen` feature to work with arrays; you can choose to leave it out
11+
skytable = { version="0.4.0", features=["const-gen"] }

examples/aio/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[package]
2+
name = "aio"
3+
version = "0.1.0"
4+
edition = "2018"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
skytable = { version="*", features=["async"], default-features=false }
10+
tokio = { version="*", features=["full"] }

examples/aio/src/main.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
use skytable::actions::AsyncActions;
2+
use skytable::aio::Connection;
3+
4+
#[tokio::main]
5+
async fn main() {
6+
let mut con = Connection::new("127.0.0.1", 2003).await.unwrap();
7+
con.flushdb().await.unwrap();
8+
con.set("x", 100).await.unwrap();
9+
assert_eq!(con.get("x").await.unwrap(), "100".to_owned());
10+
}

examples/basic/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ edition = "2018"
77
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
88

99
[dependencies]
10-
skytable = {path = "../../"}
10+
skytable = "0.4.0"

0 commit comments

Comments
 (0)