Skip to content

Commit c64e86f

Browse files
committed
Update Names etc
1 parent 4bf8865 commit c64e86f

7 files changed

Lines changed: 20 additions & 23 deletions

File tree

src/client/builder.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ mod tests {
119119
}
120120

121121
#[test]
122-
123122
fn test_sync_builder_redis_fallback() {
124123
let client = FalkorClientBuilder::new().build();
125124
assert!(client.is_ok());

src/connection/blocking.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ impl FalkorSyncConnection {
7373
.map(|[key, val]| (key.to_string(), val.to_string()))
7474
.collect()
7575
})
76-
.map_err(|_| FalkorDBError::ParsingFString)
76+
.map_err(|_| FalkorDBError::ParsingString)
7777
})
7878
}
7979
}

src/connection_info/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ mod tests {
8282
use std::{mem, str::FromStr};
8383

8484
#[test]
85-
8685
fn test_redis_fallback_provider() {
8786
let FalkorConnectionInfo::Redis(redis) =
8887
FalkorConnectionInfo::fallback_provider("redis://127.0.0.1:6379".to_string()).unwrap();
@@ -91,7 +90,6 @@ mod tests {
9190
}
9291

9392
#[test]
94-
9593
fn test_try_from_redis() {
9694
let res = FalkorConnectionInfo::try_from("redis://0.0.0.0:1234");
9795
assert!(res.is_ok());

src/error/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,21 +79,21 @@ pub enum FalkorDBError {
7979
/// Element was not of type Array.
8080
#[error("Element was not of type Array")]
8181
ParsingArray,
82-
/// Element was not of type FString.
83-
#[error("Element was not of type FString")]
84-
ParsingFString,
82+
/// Element was not of type String.
83+
#[error("Element was not of type String")]
84+
ParsingString,
8585
/// Element was not of type FEdge.
8686
#[error("Element was not of type FEdge")]
8787
ParsingFEdge,
8888
/// Element was not of type FNode.
8989
#[error("Element was not of type FNode")]
9090
ParsingFNode,
91-
/// Element was not of type FPath.
92-
#[error("Element was not of type FPath")]
93-
ParsingFPath,
94-
/// Element was not of type FMap.
95-
#[error("Element was not of type FMap")]
96-
ParsingFMap,
91+
/// Element was not of type Path.
92+
#[error("Element was not of type Path")]
93+
ParsingPath,
94+
/// Element was not of type Map.
95+
#[error("Element was not of type Map")]
96+
ParsingMap,
9797
/// Element was not of type FPoint.
9898
#[error("Element was not of type FPoint")]
9999
ParsingFPoint,

src/parser/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ use std::collections::HashMap;
99
pub(crate) fn redis_value_as_string(value: redis::Value) -> FalkorResult<String> {
1010
match value {
1111
redis::Value::Data(data) => {
12-
String::from_utf8(data).map_err(|_| FalkorDBError::ParsingFString)
12+
String::from_utf8(data).map_err(|_| FalkorDBError::ParsingString)
1313
}
1414
redis::Value::Status(status) => Ok(status),
15-
_ => Err(FalkorDBError::ParsingFString),
15+
_ => Err(FalkorDBError::ParsingString),
1616
}
1717
}
1818

@@ -176,7 +176,7 @@ fn parse_regular_falkor_map(
176176
) -> FalkorResult<HashMap<String, FalkorValue>> {
177177
value
178178
.into_map_iter()
179-
.map_err(|_| FalkorDBError::ParsingFMap)?
179+
.map_err(|_| FalkorDBError::ParsingMap)?
180180
.try_fold(HashMap::new(), |mut out_map, (key, val)| {
181181
out_map.insert(
182182
redis_value_as_string(key)?,

src/value/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl TryFrom<redis::Value> for ConfigValue {
102102
Ok(match value {
103103
redis::Value::Int(int_val) => ConfigValue::Int64(int_val),
104104
redis::Value::Data(str_data) => ConfigValue::String(
105-
String::from_utf8(str_data).map_err(|_| FalkorDBError::ParsingFString)?,
105+
String::from_utf8(str_data).map_err(|_| FalkorDBError::ParsingString)?,
106106
),
107107
_ => return Err(FalkorDBError::InvalidDataReceived),
108108
})

src/value/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ impl FalkorValue {
8484
}
8585
}
8686

87-
/// Returns a reference to the internal [`String`] if this is an FString variant.
87+
/// Returns a reference to the internal [`String`] if this is an String variant.
8888
///
8989
/// # Returns
9090
/// A reference to the internal [`String`]
@@ -117,7 +117,7 @@ impl FalkorValue {
117117
}
118118
}
119119

120-
/// Returns a reference to the internal [`Path`] if this is an FPath variant.
120+
/// Returns a reference to the internal [`Path`] if this is an Path variant.
121121
///
122122
/// # Returns
123123
/// A reference to the internal [`Path`]
@@ -128,7 +128,7 @@ impl FalkorValue {
128128
}
129129
}
130130

131-
/// Returns a reference to the internal [`HashMap`] if this is an FMap variant.
131+
/// Returns a reference to the internal [`HashMap`] if this is an Map variant.
132132
///
133133
/// # Returns
134134
/// A reference to the internal [`HashMap`]
@@ -199,14 +199,14 @@ impl FalkorValue {
199199
}
200200
}
201201

202-
/// Consumes itself and returns the inner [`String`] if this is an FString variant
202+
/// Consumes itself and returns the inner [`String`] if this is an String variant
203203
///
204204
/// # Returns
205205
/// The inner [`String`]
206206
pub fn into_string(self) -> FalkorResult<String> {
207207
match self {
208208
FalkorValue::String(string) => Ok(string),
209-
_ => Err(FalkorDBError::ParsingFString),
209+
_ => Err(FalkorDBError::ParsingString),
210210
}
211211
}
212212
/// Consumes itself and returns the inner [`HashMap`] if this is a Map variant
@@ -216,7 +216,7 @@ impl FalkorValue {
216216
pub fn into_map(self) -> FalkorResult<HashMap<String, FalkorValue>> {
217217
match self {
218218
FalkorValue::Map(map) => Ok(map),
219-
_ => Err(FalkorDBError::ParsingFMap),
219+
_ => Err(FalkorDBError::ParsingMap),
220220
}
221221
}
222222
}

0 commit comments

Comments
 (0)