Skip to content

Commit 8d3db4a

Browse files
author
Will Nelson
committed
Rename to redust
1 parent cb8e3aa commit 8d3db4a

File tree

10 files changed

+20
-18
lines changed

10 files changed

+20
-18
lines changed

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "redis"
2+
name = "redust"
33
version = "0.1.0"
44
edition = "2021"
55

@@ -14,14 +14,14 @@ bytes = "1.1"
1414
deadpool = { version = "0.9", optional = true }
1515
futures = "0.3"
1616
pin-project-lite = "0.2"
17-
resp = { path = "./resp" }
17+
redust-resp = { path = "./resp" }
1818
serde = { version = "1.0", features = ["derive"], optional = true }
1919
serde_bytes = { version = "0.11", optional = true }
20-
tokio = { version = "1.0", features = ["net", "rt"] }
20+
tokio = { version = "1.18", features = ["net", "rt"] }
2121
tokio-util = { version = "0.7", features = ["codec"] }
2222

2323
[dev-dependencies]
24-
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
24+
tokio = { version = "1.18", features = ["macros", "rt-multi-thread"] }
2525
tokio-test = "0.4"
2626

2727
[features]

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Redis
1+
# Redust
22

33
A simple Redis client & RESP parser for Rust.
44

5-
[Documentation](https://appellation.github.io/redis-rs/redis/)
5+
[Documentation](https://appellation.github.io/redis-rs/redust/)

resp/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "resp"
2+
name = "redust-resp"
33
version = "0.1.0"
44
edition = "2021"
55

src/codec.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
use bytes::{Buf, BufMut, BytesMut};
2-
use resp::{
2+
use redust_resp::{
33
from_bytes,
44
nom::{Err, Needed},
55
to_bytes, Data, ReadError,
@@ -38,7 +38,7 @@ impl Decoder for Codec {
3838
let end_len = remaining.len();
3939

4040
let result = match data {
41-
resp::Error::Parse(Err::Incomplete(needed)) => {
41+
redust_resp::Error::Parse(Err::Incomplete(needed)) => {
4242
if let Needed::Size(size) = needed {
4343
src.reserve(size.into());
4444
}

src/connection.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::{
88

99
use futures::{Sink, SinkExt, Stream, TryStreamExt};
1010
use pin_project_lite::pin_project;
11-
use resp::Data;
11+
use redust_resp::Data;
1212
use tokio::{
1313
net::{TcpStream, ToSocketAddrs},
1414
spawn,
@@ -207,7 +207,7 @@ mod test {
207207

208208
#[cfg(feature = "model")]
209209
use futures::TryStreamExt;
210-
use resp::{array, from_data, Data};
210+
use redust_resp::{array, from_data, Data};
211211

212212
#[cfg(feature = "model")]
213213
use crate::model::pubsub;

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ pub mod model;
3535
#[cfg(feature = "pool")]
3636
pub mod pool;
3737

38-
pub use resp;
38+
pub use redust_resp as resp;
3939

4040
pub use codec::Codec;
4141
pub use connection::Connection;

src/model/pubsub.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl<'a, 'de: 'a> de::Deserialize<'de> for Response<'a> {
129129

130130
#[cfg(test)]
131131
mod test {
132-
use resp::from_bytes;
132+
use redust_resp::from_bytes;
133133

134134
use crate::model::pubsub::Subscription;
135135

src/model/stream.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::{
33
str::FromStr,
44
};
55

6-
use resp::nom::{
6+
use redust_resp::nom::{
77
character::complete::{char, u64},
88
combinator::complete,
99
error::Error,

src/model/stream/claim.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub struct AutoclaimResponse<'a>(
1717

1818
#[cfg(test)]
1919
mod test {
20-
use resp::from_bytes;
20+
use redust_resp::from_bytes;
2121

2222
use crate::model::stream::{
2323
read::{Entries, Entry, Field, Value},

src/model/stream/read.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,23 @@ pub struct Value<'a>(#[serde(borrow, with = "serde_bytes")] pub Cow<'a, [u8]>);
2222
/// All entries in a stream, belonging to a [Key].
2323
#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize, Deserialize)]
2424
#[serde(transparent)]
25-
pub struct Entries<'a>(#[serde(borrow, with = "resp::util::tuple_map")] pub HashMap<Id, Entry<'a>>);
25+
pub struct Entries<'a>(
26+
#[serde(borrow, with = "redust_resp::util::tuple_map")] pub HashMap<Id, Entry<'a>>,
27+
);
2628

2729
pub type Entry<'a> = HashMap<Field<'a>, Value<'a>>;
2830

2931
#[derive(Debug, Default, PartialEq, Eq, Clone, Serialize, Deserialize)]
3032
#[serde(transparent)]
3133
pub struct ReadResponse<'a>(
32-
#[serde(borrow, with = "resp::util::tuple_map")] pub HashMap<Key<'a>, Entries<'a>>,
34+
#[serde(borrow, with = "redust_resp::util::tuple_map")] pub HashMap<Key<'a>, Entries<'a>>,
3335
);
3436

3537
#[cfg(test)]
3638
mod test {
3739
use std::borrow::Cow;
3840

39-
use resp::{array, from_data, Data};
41+
use redust_resp::{array, from_data, Data};
4042

4143
use crate::model::stream::{
4244
read::{Field, Key, Value},

0 commit comments

Comments
 (0)