Skip to content

Commit

Permalink
Minor fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
nihohit committed Aug 16, 2022
1 parent 090caf3 commit 13ad495
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions redis/src/types.rs
Expand Up @@ -267,11 +267,12 @@ impl From<Utf8Error> for RedisError {
}

impl From<NulError> for RedisError {
fn from(_: NulError) -> RedisError {
fn from(err: NulError) -> RedisError {
RedisError {
repr: ErrorRepr::WithDescription(
repr: ErrorRepr::WithDescriptionAndDetail(
ErrorKind::TypeError,
"Value contains interior nul terminator",
err.to_string(),
),
}
}
Expand Down Expand Up @@ -1165,7 +1166,7 @@ impl FromRedisValue for CString {
Value::Data(ref bytes) => Ok(CString::new(bytes.clone())?),
Value::Okay => Ok(CString::new("OK")?),
Value::Status(ref val) => Ok(CString::new(val.as_bytes())?),
_ => invalid_type_error!(v, "Response type not string compatible."),
_ => invalid_type_error!(v, "Response type not CString compatible."),
}
}
}
Expand Down

0 comments on commit 13ad495

Please sign in to comment.