Repository: scylladb/scylla-rust-driver
Pull request #203 (2021-03-30 15:01:59)

Apply suggestions from clippy 1.51
## Description
After update to Rust 1.51 cargo clippy shows more suggestions.
We need to apply them in order to pass the CI.

## Changes:
* All abbreviations changed so that only the first letter is uppercase (`LZ4` -> `Lz4`, `CQL` -> `Cql`, etc...)
* Removed some redundant slicings (`&slice[..]` -> `slice`)
* `Vec::new(); vec.push()` changed to `vec![]`
* Changed `Into` to `From`
* Removed redundant `;`

## Pre-review checklist

<!--
    Make sure you took care of the issues on the list.
    Put 'x' into those boxes which apply.
    You can also create the PR now and click on all relevant checkboxes.
    See CONTRIBUTING.md for more details.
-->

- [x] I have split my patch into logically separate commits.
- [x] All commit messages clearly explain what they change and why.
- [x] I added relevant tests for new features and bug fixes.
- [x] All commits compile, pass static checks and pass test.
- [x] PR description sums up the changes and reasons why they should be introduced.
- [x] I added appropriate `Fixes:` annotations to PR description.



Patch:
diff --git a/examples/cql-time-types.rs b/examples/cql-time-types.rs
index 90b9ea0b..20a542bd 100644
--- a/examples/cql-time-types.rs
+++ b/examples/cql-time-types.rs
@@ -3,7 +3,7 @@
 
 use anyhow::Result;
 use chrono::{Duration, NaiveDate};
-use scylla::frame::response::result::CQLValue;
+use scylla::frame::response::result::CqlValue;
 use scylla::frame::value::{Date, Time, Timestamp};
 use scylla::transport::session::{IntoTypedRows, Session};
 use scylla::SessionBuilder;
@@ -56,7 +56,7 @@ async fn main() -> Result<()> {
     if let Some(rows) = session.query("SELECT d from ks.dates", &[]).await? {
         for row in rows {
             let read_days: u32 = match row.columns[0] {
-                Some(CQLValue::Date(days)) => days,
+                Some(CqlValue::Date(days)) => days,
                 _ => panic!("oh no"),
             };
 
diff --git a/examples/cqlsh-rs.rs b/examples/cqlsh-rs.rs
index ea2174f1..8275bddc 100644
--- a/examples/cqlsh-rs.rs
+++ b/examples/cqlsh-rs.rs
@@ -13,7 +13,7 @@ async fn main() -> Result<()> {
 
     let session: Session = SessionBuilder::new()
         .known_node(uri)
-        .compression(Some(Compression::LZ4))
+        .compression(Some(Compression::Lz4))
         .build()
         .await?;
 
diff --git a/examples/user-defined-type.rs b/examples/user-defined-type.rs
index f959a9a9..6f04d938 100644
--- a/examples/user-defined-type.rs
+++ b/examples/user-defined-type.rs
@@ -1,5 +1,5 @@
 use anyhow::Result;
-use scylla::cql_to_rust::FromCQLVal;
+use scylla::cql_to_rust::FromCqlVal;
 use scylla::macros::{FromUserType, IntoUserType};
 use scylla::{IntoTypedRows, Session, SessionBuilder};
 use std::env;
diff --git a/scylla-macros/src/from_row.rs b/scylla-macros/src/from_row.rs
index ba3a0914..ac248350 100644
--- a/scylla-macros/src/from_row.rs
+++ b/scylla-macros/src/from_row.rs
@@ -14,7 +14,7 @@ pub fn from_row_derive(tokens_input: TokenStream) -> TokenStream {
         let field_type = &field.ty;
 
         quote_spanned! {field.span() =>
-            #field_name: <#field_type as FromCQLVal<Option<CQLValue>>>::from_cql(
+            #field_name: <#field_type as FromCqlVal<Option<CqlValue>>>::from_cql(
                 vals_iter
                 .next()
                 .ok_or(FromRowError::RowTooShort) ?
@@ -26,8 +26,8 @@ pub fn from_row_derive(tokens_input: TokenStream) -> TokenStream {
         impl FromRow for #struct_name {
             fn from_row(row: scylla::frame::response::result::Row)
             -> Result<Self, scylla::cql_to_rust::FromRowError> {
-                use scylla::frame::response::result::CQLValue;
-                use scylla::cql_to_rust::{FromCQLVal, FromRow, FromRowError};
+                use scylla::frame::response::result::CqlValue;
+                use scylla::cql_to_rust::{FromCqlVal, FromRow, FromRowError};
 
                 let mut vals_iter = row.columns.into_iter();
 
diff --git a/scylla-macros/src/from_user_type.rs b/scylla-macros/src/from_user_type.rs
index 06e67f0a..d50db3bd 100644
--- a/scylla-macros/src/from_user_type.rs
+++ b/scylla-macros/src/from_user_type.rs
@@ -14,7 +14,7 @@ pub fn from_user_type_derive(tokens_input: TokenStream) -> TokenStream {
         let field_type = &field.ty;
 
         quote_spanned! {field.span() =>
-            #field_name: <#field_type as FromCQLVal<Option<CQLValue>>>::from_cql(
+            #field_name: <#field_type as FromCqlVal<Option<CqlValue>>>::from_cql(
                 // Take value with key #field_name out of fields map, if none found then return NULL
                 fields.remove(stringify!(#field_name)).unwrap_or(None)
             ) ?,
@@ -22,17 +22,17 @@ pub fn from_user_type_derive(tokens_input: TokenStream) -> TokenStream {
     });
 
     let generated = quote! {
-        impl FromCQLVal<scylla::frame::response::result::CQLValue> for #struct_name {
-            fn from_cql(cql_val: scylla::frame::response::result::CQLValue)
-            -> Result<Self, scylla::cql_to_rust::FromCQLValError> {
+        impl FromCqlVal<scylla::frame::response::result::CqlValue> for #struct_name {
+            fn from_cql(cql_val: scylla::frame::response::result::CqlValue)
+            -> Result<Self, scylla::cql_to_rust::FromCqlValError> {
                 use std::collections::BTreeMap;
-                use scylla::cql_to_rust::{FromCQLVal, FromCQLValError};
-                use scylla::frame::response::result::CQLValue;
+                use scylla::cql_to_rust::{FromCqlVal, FromCqlValError};
+                use scylla::frame::response::result::CqlValue;
 
-                // Interpret CQLValue as CQlValue::UserDefinedType
-                let mut fields: BTreeMap<String, Option<CQLValue>> = match cql_val {
-                    CQLValue::UserDefinedType{fields, ..} => fields,
-                    _ => return Err(FromCQLValError::BadCQLType),
+                // Interpret CqlValue as CQlValue::UserDefinedType
+                let mut fields: BTreeMap<String, Option<CqlValue>> = match cql_val {
+                    CqlValue::UserDefinedType{fields, ..} => fields,
+                    _ => return Err(FromCqlValError::BadCqlType),
                 };
 
                 // Parse struct using values from fields
@@ -42,7 +42,7 @@ pub fn from_user_type_derive(tokens_input: TokenStream) -> TokenStream {
 
                 // There should be no unused fields when reading user defined type
                 if !fields.is_empty() {
-                    return Err(FromCQLValError::BadCQLType);
+                    return Err(FromCqlValError::BadCqlType);
                 }
 
                 return Ok(result);
diff --git a/scylla/src/frame/frame_errors.rs b/scylla/src/frame/frame_errors.rs
index 81692f0a..c1888d7a 100644
--- a/scylla/src/frame/frame_errors.rs
+++ b/scylla/src/frame/frame_errors.rs
@@ -1,5 +1,5 @@
 use super::response;
-use crate::cql_to_rust::CQLTypeError;
+use crate::cql_to_rust::CqlTypeError;
 use crate::frame::value::SerializeValuesError;
 use thiserror::Error;
 
@@ -10,7 +10,7 @@ pub enum FrameError {
     #[error("Frame is compressed, but no compression negotiated for connection.")]
     NoCompressionNegotiated,
     #[error("L4Z body decompression failed")]
-    LZ4BodyDecompression,
+    Lz4BodyDecompression,
     #[error("Received frame marked as coming from a client")]
     FrameFromClient,
     #[error("Received a frame from version {0}, but only 4 is supported")]
@@ -22,7 +22,7 @@ pub enum FrameError {
     #[error("Frame compression failed.")]
     FrameCompression,
     #[error("std io error encountered while processing")]
-    StdIOError(#[from] std::io::Error),
+    StdIoError(#[from] std::io::Error),
     #[error("Unrecognized opcode{0}")]
     TryFromPrimitiveError(#[from] num_enum::TryFromPrimitiveError<response::ResponseOpcode>),
 }
@@ -38,5 +38,5 @@ pub enum ParseError {
     #[error(transparent)]
     SerializeValuesError(#[from] SerializeValuesError),
     #[error(transparent)]
-    CQLTypeError(#[from] CQLTypeError),
+    CqlTypeError(#[from] CqlTypeError),
 }
diff --git a/scylla/src/frame/mod.rs b/scylla/src/frame/mod.rs
index 91b3ef88..49337cbe 100644
--- a/scylla/src/frame/mod.rs
+++ b/scylla/src/frame/mod.rs
@@ -194,11 +194,11 @@ pub fn parse_response_body_extensions(
 
 pub fn compress(uncomp_body: &[u8], compression: Compression) -> Result<Vec<u8>, FrameError> {
     match compression {
-        Compression::LZ4 => {
+        Compression::Lz4 => {
             let uncomp_len = uncomp_body.len() as u32;
             let mut tmp =
                 Vec::with_capacity(lz4::compression_bound(uncomp_len).unwrap_or(0) as usize);
-            lz4::encode_block(&uncomp_body[..], &mut tmp);
+            lz4::encode_block(uncomp_body, &mut tmp);
 
             let mut comp_body = Vec::with_capacity(std::mem::size_of::<u32>() + tmp.len());
             comp_body.put_u32(uncomp_len);
@@ -213,16 +213,16 @@ pub fn compress(uncomp_body: &[u8], compression: Compression) -> Result<Vec<u8>,
 
 pub fn decompress(mut comp_body: &[u8], compression: Compression) -> Result<Vec<u8>, FrameError> {
     match compression {
-        Compression::LZ4 => {
+        Compression::Lz4 => {
             let uncomp_len = comp_body.get_u32() as usize;
             let mut uncomp_body = Vec::with_capacity(uncomp_len);
             if uncomp_len == 0 {
                 return Ok(uncomp_body);
             }
-            if lz4::decode_block(&comp_body[..], &mut uncomp_body) > 0 {
+            if lz4::decode_block(comp_body, &mut uncomp_body) > 0 {
                 Ok(uncomp_body)
             } else {
-                Err(FrameError::LZ4BodyDecompression)
+                Err(FrameError::Lz4BodyDecompression)
             }
         }
         Compression::Snappy => snap::raw::Decoder::new()
diff --git a/scylla/src/frame/response/cql_to_rust.rs b/scylla/src/frame/response/cql_to_rust.rs
index 64a6367d..2edb3fae 100644
--- a/scylla/src/frame/response/cql_to_rust.rs
+++ b/scylla/src/frame/response/cql_to_rust.rs
@@ -1,4 +1,4 @@
-use super::result::{CQLValue, Row};
+use super::result::{CqlValue, Row};
 use crate::frame::value::Counter;
 use bigdecimal::BigDecimal;
 use chrono::{Duration, NaiveDate};
@@ -12,28 +12,28 @@ use uuid::Uuid;
 #[derive(Error, Debug, Clone, PartialEq, Eq)]
 pub enum FromRowError {
     #[error("Bad CQL value")]
-    BadCQLVal(#[from] FromCQLValError),
+    BadCqlVal(#[from] FromCqlValError),
     #[error("Row too short")]
     RowTooShort,
 }
 
 #[derive(Error, Debug, PartialEq, Eq)]
-pub enum CQLTypeError {
+pub enum CqlTypeError {
     #[error("Invalid number of set elements: {0}")]
     InvalidNumberOfElements(i32),
 }
 
-/// This trait defines a way to convert CQLValue or Option<CQLValue> into some rust type
-// We can't use From trait because impl From<Option<CQLValue>> for String {...}
+/// This trait defines a way to convert CqlValue or Option<CqlValue> into some rust type
+// We can't use From trait because impl From<Option<CqlValue>> for String {...}
 // is forbidden since neither From nor String are defined in this crate
-pub trait FromCQLVal<T>: Sized {
-    fn from_cql(cql_val: T) -> Result<Self, FromCQLValError>;
+pub trait FromCqlVal<T>: Sized {
+    fn from_cql(cql_val: T) -> Result<Self, FromCqlValError>;
 }
 
 #[derive(Error, Debug, Clone, PartialEq, Eq)]
-pub enum FromCQLValError {
+pub enum FromCqlValError {
     #[error("Bad CQL type")]
-    BadCQLType,
+    BadCqlType,
     #[error("Value is null")]
     ValIsNull,
 }
@@ -43,68 +43,68 @@ pub trait FromRow: Sized {
     fn from_row(row: Row) -> Result<Self, FromRowError>;
 }
 
-// Implement from_cql<Option<CQLValue>> for every type that has from_cql<CQLValue>
+// Implement from_cql<Option<CqlValue>> for every type that has from_cql<CqlValue>
 // This tries to unwrap the option or fails with an error
-impl<T: FromCQLVal<CQLValue>> FromCQLVal<Option<CQLValue>> for T {
-    fn from_cql(cql_val_opt: Option<CQLValue>) -> Result<Self, FromCQLValError> {
-        T::from_cql(cql_val_opt.ok_or(FromCQLValError::ValIsNull)?)
+impl<T: FromCqlVal<CqlValue>> FromCqlVal<Option<CqlValue>> for T {
+    fn from_cql(cql_val_opt: Option<CqlValue>) -> Result<Self, FromCqlValError> {
+        T::from_cql(cql_val_opt.ok_or(FromCqlValError::ValIsNull)?)
     }
 }
 
-// Implement from_cql<Option<CQLValue>> for Option<T> for every type that has from_cql<CQLValue>
-// Value inside Option gets mapped from CQLValue to T
-impl<T: FromCQLVal<CQLValue>> FromCQLVal<Option<CQLValue>> for Option<T> {
-    fn from_cql(cql_val_opt: Option<CQLValue>) -> Result<Self, FromCQLValError> {
+// Implement from_cql<Option<CqlValue>> for Option<T> for every type that has from_cql<CqlValue>
+// Value inside Option gets mapped from CqlValue to T
+impl<T: FromCqlVal<CqlValue>> FromCqlVal<Option<CqlValue>> for Option<T> {
+    fn from_cql(cql_val_opt: Option<CqlValue>) -> Result<Self, FromCqlValError> {
         match cql_val_opt {
             Some(cql_val) => Ok(Some(T::from_cql(cql_val)?)),
             None => Ok(None),
         }
     }
 }
-// This macro implements FromCQLVal given a type and method of CQLValue that returns this type
+// This macro implements FromCqlVal given a type and method of CqlValue that returns this type
 macro_rules! impl_from_cql_val {
     ($T:ty, $convert_func:ident) => {
-        impl FromCQLVal<CQLValue> for $T {
-            fn from_cql(cql_val: CQLValue) -> Result<$T, FromCQLValError> {
-                cql_val.$convert_func().ok_or(FromCQLValError::BadCQLType)
+        impl FromCqlVal<CqlValue> for $T {
+            fn from_cql(cql_val: CqlValue) -> Result<$T, FromCqlValError> {
+                cql_val.$convert_func().ok_or(FromCqlValError::BadCqlType)
             }
         }
     };
 }
 
-impl_from_cql_val!(i32, as_int); // i32::from_cql<CQLValue>
-impl_from_cql_val!(i64, as_bigint); // i64::from_cql<CQLValue>
-impl_from_cql_val!(Counter, as_counter); // Counter::from_cql<CQLValue>
-impl_from_cql_val!(i16, as_smallint); // i16::from_cql<CQLValue>
-impl_from_cql_val!(BigInt, into_varint); // BigInt::from_cql<CQLValue>
-impl_from_cql_val!(i8, as_tinyint); // i8::from_cql<CQLValue>
-impl_from_cql_val!(NaiveDate, as_date); // NaiveDate::from_cql<CQLValue>
-impl_from_cql_val!(f32, as_float); // f32::from_cql<CQLValue>
-impl_from_cql_val!(f64, as_double); // f64::from_cql<CQLValue>
-impl_from_cql_val!(bool, as_boolean); // bool::from_cql<CQLValue>
-impl_from_cql_val!(String, into_string); // String::from_cql<CQLValue>
-impl_from_cql_val!(IpAddr, as_inet); // IpAddr::from_cql<CQLValue>
-impl_from_cql_val!(Uuid, as_uuid); // Uuid::from_cql<CQLValue>
-impl_from_cql_val!(BigDecimal, into_decimal); // BigDecimal::from_cql<CQLValue>
-impl_from_cql_val!(Duration, as_duration); // Duration::from_cql<CQLValue>
-
-// Vec<T>::from_cql<CQLValue>
-impl<T: FromCQLVal<CQLValue>> FromCQLVal<CQLValue> for Vec<T> {
-    fn from_cql(cql_val: CQLValue) -> Result<Self, FromCQLValError> {
+impl_from_cql_val!(i32, as_int); // i32::from_cql<CqlValue>
+impl_from_cql_val!(i64, as_bigint); // i64::from_cql<CqlValue>
+impl_from_cql_val!(Counter, as_counter); // Counter::from_cql<CqlValue>
+impl_from_cql_val!(i16, as_smallint); // i16::from_cql<CqlValue>
+impl_from_cql_val!(BigInt, into_varint); // BigInt::from_cql<CqlValue>
+impl_from_cql_val!(i8, as_tinyint); // i8::from_cql<CqlValue>
+impl_from_cql_val!(NaiveDate, as_date); // NaiveDate::from_cql<CqlValue>
+impl_from_cql_val!(f32, as_float); // f32::from_cql<CqlValue>
+impl_from_cql_val!(f64, as_double); // f64::from_cql<CqlValue>
+impl_from_cql_val!(bool, as_boolean); // bool::from_cql<CqlValue>
+impl_from_cql_val!(String, into_string); // String::from_cql<CqlValue>
+impl_from_cql_val!(IpAddr, as_inet); // IpAddr::from_cql<CqlValue>
+impl_from_cql_val!(Uuid, as_uuid); // Uuid::from_cql<CqlValue>
+impl_from_cql_val!(BigDecimal, into_decimal); // BigDecimal::from_cql<CqlValue>
+impl_from_cql_val!(Duration, as_duration); // Duration::from_cql<CqlValue>
+
+// Vec<T>::from_cql<CqlValue>
+impl<T: FromCqlVal<CqlValue>> FromCqlVal<CqlValue> for Vec<T> {
+    fn from_cql(cql_val: CqlValue) -> Result<Self, FromCqlValError> {
         cql_val
             .into_vec()
-            .ok_or(FromCQLValError::BadCQLType)?
+            .ok_or(FromCqlValError::BadCqlType)?
             .into_iter()
             .map(T::from_cql)
-            .collect::<Result<Vec<T>, FromCQLValError>>()
+            .collect::<Result<Vec<T>, FromCqlValError>>()
     }
 }
 
-impl<T1: FromCQLVal<CQLValue> + Eq + Hash, T2: FromCQLVal<CQLValue>> FromCQLVal<CQLValue>
+impl<T1: FromCqlVal<CqlValue> + Eq + Hash, T2: FromCqlVal<CqlValue>> FromCqlVal<CqlValue>
     for HashMap<T1, T2>
 {
-    fn from_cql(cql_val: CQLValue) -> Result<Self, FromCQLValError> {
-        let vec = cql_val.into_pair_vec().ok_or(FromCQLValError::BadCQLType)?;
+    fn from_cql(cql_val: CqlValue) -> Result<Self, FromCqlValError> {
+        let vec = cql_val.into_pair_vec().ok_or(FromCqlValError::BadCqlType)?;
         let mut res = HashMap::with_capacity(vec.len());
         for (key, value) in vec {
             res.insert(T1::from_cql(key)?, T2::from_cql(value)?);
@@ -113,12 +113,12 @@ impl<T1: FromCQLVal<CQLValue> + Eq + Hash, T2: FromCQLVal<CQLValue>> FromCQLVal<
     }
 }
 
-// This macro implements FromRow for tuple of types that have FromCQLVal
+// This macro implements FromRow for tuple of types that have FromCqlVal
 macro_rules! impl_tuple_from_row {
     ( $($Ti:tt),+ ) => {
         impl<$($Ti),+> FromRow for ($($Ti,)+)
         where
-            $($Ti: FromCQLVal<Option<CQLValue>>),+
+            $($Ti: FromCqlVal<Option<CqlValue>>),+
         {
             fn from_row(row: Row) -> Result<Self, FromRowError> {
                 let mut vals_iter = row.columns.into_iter();
@@ -156,21 +156,21 @@ impl_tuple_from_row!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
 
 macro_rules! impl_tuple_from_cql {
     ( $($Ti:tt),+ ) => {
-        impl<$($Ti),+> FromCQLVal<CQLValue> for ($($Ti,)+)
+        impl<$($Ti),+> FromCqlVal<CqlValue> for ($($Ti,)+)
         where
-            $($Ti: FromCQLVal<CQLValue>),+
+            $($Ti: FromCqlVal<CqlValue>),+
         {
-            fn from_cql(cql_val: CQLValue) -> Result<Self, FromCQLValError> {
+            fn from_cql(cql_val: CqlValue) -> Result<Self, FromCqlValError> {
                 let tuple_fields = match cql_val {
-                    CQLValue::Tuple(fields) => fields,
-                    _ => return Err(FromCQLValError::BadCQLType)
+                    CqlValue::Tuple(fields) => fields,
+                    _ => return Err(FromCqlValError::BadCqlType)
                 };
 
                 let mut tuple_fields_iter = tuple_fields.into_iter();
 
                 Ok((
                     $(
-                        $Ti::from_cql(tuple_fields_iter.next().ok_or(FromCQLValError::BadCQLType) ?) ?
+                        $Ti::from_cql(tuple_fields_iter.next().ok_or(FromCqlValError::BadCqlType) ?) ?
                     ,)+
                 ))
             }
@@ -197,7 +197,7 @@ impl_tuple_from_cql!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14
 
 #[cfg(test)]
 mod tests {
-    use super::{CQLValue, FromCQLVal, FromCQLValError, FromRow, FromRowError, Row};
+    use super::{CqlValue, FromCqlVal, FromCqlValError, FromRow, FromRowError, Row};
     use crate as scylla;
     use crate::frame::value::Counter;
     use crate::macros::FromRow;
@@ -210,54 +210,54 @@ mod tests {
 
     #[test]
     fn i32_from_cql() {
-        assert_eq!(Ok(1234), i32::from_cql(CQLValue::Int(1234)));
+        assert_eq!(Ok(1234), i32::from_cql(CqlValue::Int(1234)));
     }
 
     #[test]
     fn bool_from_cql() {
-        assert_eq!(Ok(true), bool::from_cql(CQLValue::Boolean(true)));
-        assert_eq!(Ok(false), bool::from_cql(CQLValue::Boolean(false)));
+        assert_eq!(Ok(true), bool::from_cql(CqlValue::Boolean(true)));
+        assert_eq!(Ok(false), bool::from_cql(CqlValue::Boolean(false)));
     }
 
     #[test]
     fn floatingpoints_from_cql() {
         let float: f32 = 2.13;
         let double: f64 = 4.26;
-        assert_eq!(Ok(float), f32::from_cql(CQLValue::Float(float)));
-        assert_eq!(Ok(double), f64::from_cql(CQLValue::Double(double)));
+        assert_eq!(Ok(float), f32::from_cql(CqlValue::Float(float)));
+        assert_eq!(Ok(double), f64::from_cql(CqlValue::Double(double)));
     }
 
     #[test]
     fn i64_from_cql() {
-        assert_eq!(Ok(1234), i64::from_cql(CQLValue::BigInt(1234)));
+        assert_eq!(Ok(1234), i64::from_cql(CqlValue::BigInt(1234)));
     }
 
     #[test]
     fn i8_from_cql() {
-        assert_eq!(Ok(6), i8::from_cql(CQLValue::TinyInt(6)));
+        assert_eq!(Ok(6), i8::from_cql(CqlValue::TinyInt(6)));
     }
 
     #[test]
     fn i16_from_cql() {
-        assert_eq!(Ok(16), i16::from_cql(CQLValue::SmallInt(16)));
+        assert_eq!(Ok(16), i16::from_cql(CqlValue::SmallInt(16)));
     }
 
     #[test]
     fn string_from_cql() {
         assert_eq!(
             Ok("ascii_test".to_string()),
-            String::from_cql(CQLValue::Ascii("ascii_test".to_string()))
+            String::from_cql(CqlValue::Ascii("ascii_test".to_string()))
         );
         assert_eq!(
             Ok("text_test".to_string()),
-            String::from_cql(CQLValue::Text("text_test".to_string()))
+            String::from_cql(CqlValue::Text("text_test".to_string()))
         );
     }
 
     #[test]
     fn ip_addr_from_cql() {
         let ip_addr = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
-        assert_eq!(Ok(ip_addr), IpAddr::from_cql(CQLValue::Inet(ip_addr)));
+        assert_eq!(Ok(ip_addr), IpAddr::from_cql(CqlValue::Inet(ip_addr)));
     }
 
     #[test]
@@ -265,7 +265,7 @@ mod tests {
         let big_int = 0.to_bigint().unwrap();
         assert_eq!(
             Ok(big_int),
-            BigInt::from_cql(CQLValue::Varint(0.to_bigint().unwrap()))
+            BigInt::from_cql(CqlValue::Varint(0.to_bigint().unwrap()))
         );
     }
 
@@ -274,40 +274,40 @@ mod tests {
         let decimal = BigDecimal::from_str("123.4").unwrap();
         assert_eq!(
             Ok(decimal.clone()),
-            BigDecimal::from_cql(CQLValue::Decimal(decimal))
+            BigDecimal::from_cql(CqlValue::Decimal(decimal))
         );
     }
 
     #[test]
     fn counter_from_cql() {
         let counter = Counter(1);
-        assert_eq!(Ok(counter), Counter::from_cql(CQLValue::Counter(counter)));
+        assert_eq!(Ok(counter), Counter::from_cql(CqlValue::Counter(counter)));
     }
 
     #[test]
     fn naive_date_from_cql() {
-        let unix_epoch: CQLValue = CQLValue::Date(2_u32.pow(31));
+        let unix_epoch: CqlValue = CqlValue::Date(2_u32.pow(31));
         assert_eq!(
             Ok(NaiveDate::from_ymd(1970, 1, 1)),
             NaiveDate::from_cql(unix_epoch)
         );
 
-        let before_epoch: CQLValue = CQLValue::Date(2_u32.pow(31) - 30);
+        let before_epoch: CqlValue = CqlValue::Date(2_u32.pow(31) - 30);
         assert_eq!(
             Ok(NaiveDate::from_ymd(1969, 12, 2)),
             NaiveDate::from_cql(before_epoch)
         );
 
-        let after_epoch: CQLValue = CQLValue::Date(2_u32.pow(31) + 30);
+        let after_epoch: CqlValue = CqlValue::Date(2_u32.pow(31) + 30);
         assert_eq!(
             Ok(NaiveDate::from_ymd(1970, 1, 31)),
             NaiveDate::from_cql(after_epoch)
         );
 
-        let min_date: CQLValue = CQLValue::Date(0);
+        let min_date: CqlValue = CqlValue::Date(0);
         assert!(NaiveDate::from_cql(min_date).is_err());
 
-        let max_date: CQLValue = CQLValue::Date(u32::max_value());
+        let max_date: CqlValue = CqlValue::Date(u32::max_value());
         assert!(NaiveDate::from_cql(max_date).is_err());
     }
 
@@ -316,13 +316,13 @@ mod tests {
         let time_duration = Duration::nanoseconds(86399999999999);
         assert_eq!(
             time_duration,
-            Duration::from_cql(CQLValue::Time(time_duration)).unwrap(),
+            Duration::from_cql(CqlValue::Time(time_duration)).unwrap(),
         );
 
         let timestamp_duration = Duration::milliseconds(i64::min_value());
         assert_eq!(
             timestamp_duration,
-            Duration::from_cql(CQLValue::Timestamp(timestamp_duration)).unwrap(),
+            Duration::from_cql(CqlValue::Timestamp(timestamp_duration)).unwrap(),
         );
     }
 
@@ -332,18 +332,18 @@ mod tests {
 
         assert_eq!(
             test_uuid,
-            Uuid::from_cql(CQLValue::Uuid(test_uuid)).unwrap()
+            Uuid::from_cql(CqlValue::Uuid(test_uuid)).unwrap()
         );
 
         assert_eq!(
             test_uuid,
-            Uuid::from_cql(CQLValue::Timeuuid(test_uuid)).unwrap()
+            Uuid::from_cql(CqlValue::Timeuuid(test_uuid)).unwrap()
         );
     }
 
     #[test]
     fn vec_from_cql() {
-        let cql_val = CQLValue::Set(vec![CQLValue::Int(1), CQLValue::Int(2), CQLValue::Int(3)]);
+        let cql_val = CqlValue::Set(vec![CqlValue::Int(1), CqlValue::Int(2), CqlValue::Int(3)]);
         assert_eq!(Ok(vec![1, 2, 3]), Vec::<i32>::from_cql(cql_val));
     }
 
@@ -351,8 +351,8 @@ mod tests {
     fn tuple_from_row() {
         let row = Row {
             columns: vec![
-                Some(CQLValue::Int(1)),
-                Some(CQLValue::Text("some_text".to_string())),
+                Some(CqlValue::Int(1)),
+                Some(CqlValue::Text("some_text".to_string())),
                 None,
             ],
         };
@@ -363,7 +363,7 @@ mod tests {
         assert_eq!(c, None);
 
         let row2 = Row {
-            columns: vec![Some(CQLValue::Int(1)), Some(CQLValue::Int(2))],
+            columns: vec![Some(CqlValue::Int(1)), Some(CqlValue::Int(2))],
         };
 
         let (d,) = <(i32,)>::from_row(row2).unwrap();
@@ -372,14 +372,14 @@ mod tests {
 
     #[test]
     fn from_cql_null() {
-        assert_eq!(i32::from_cql(None), Err(FromCQLValError::ValIsNull));
+        assert_eq!(i32::from_cql(None), Err(FromCqlValError::ValIsNull));
     }
 
     #[test]
     fn from_cql_wrong_type() {
         assert_eq!(
-            i32::from_cql(CQLValue::BigInt(1234)),
-            Err(FromCQLValError::BadCQLType)
+            i32::from_cql(CqlValue::BigInt(1234)),
+            Err(FromCqlValError::BadCqlType)
         );
     }
 
@@ -391,26 +391,26 @@ mod tests {
 
         assert_eq!(
             <(i32,)>::from_row(row),
-            Err(FromRowError::BadCQLVal(FromCQLValError::ValIsNull))
+            Err(FromRowError::BadCqlVal(FromCqlValError::ValIsNull))
         );
     }
 
     #[test]
     fn from_row_wrong_type() {
         let row = Row {
-            columns: vec![Some(CQLValue::Int(1234))],
+            columns: vec![Some(CqlValue::Int(1234))],
         };
 
         assert_eq!(
             <(String,)>::from_row(row),
-            Err(FromRowError::BadCQLVal(FromCQLValError::BadCQLType))
+            Err(FromRowError::BadCqlVal(FromCqlValError::BadCqlType))
         );
     }
 
     #[test]
     fn from_row_too_short() {
         let row = Row {
-            columns: vec![Some(CQLValue::Int(1234))],
+            columns: vec![Some(CqlValue::Int(1234))],
         };
 
         assert_eq!(<(i32, i32)>::from_row(row), Err(FromRowError::RowTooShort));
@@ -427,9 +427,9 @@ mod tests {
 
         let row = Row {
             columns: vec![
-                Some(CQLValue::Int(16)),
+                Some(CqlValue::Int(16)),
                 None,
-                Some(CQLValue::Set(vec![CQLValue::Int(1), CQLValue::Int(2)])),
+                Some(CqlValue::Set(vec![CqlValue::Int(1), CqlValue::Int(2)])),
             ],
         };
 
diff --git a/scylla/src/frame/response/error.rs b/scylla/src/frame/response/error.rs
index 8f195faf..9949757f 100644
--- a/scylla/src/frame/response/error.rs
+++ b/scylla/src/frame/response/error.rs
@@ -1,11 +1,11 @@
 use crate::frame::frame_errors::ParseError;
 use crate::frame::types;
-use crate::transport::errors::{DBError, QueryError, WriteType};
+use crate::transport::errors::{DbError, QueryError, WriteType};
 use byteorder::ReadBytesExt;
 
 #[derive(Debug)]
 pub struct Error {
-    pub error: DBError,
+    pub error: DbError,
     pub reason: String,
 }
 
@@ -14,68 +14,68 @@ impl Error {
         let code = types::read_int(buf)?;
         let reason = types::read_string(buf)?.to_owned();
 
-        let error: DBError = match code {
-            0x0000 => DBError::ServerError,
-            0x000A => DBError::ProtocolError,
-            0x0100 => DBError::AuthenticationError,
-            0x1000 => DBError::Unavailable {
+        let error: DbError = match code {
+            0x0000 => DbError::ServerError,
+            0x000A => DbError::ProtocolError,
+            0x0100 => DbError::AuthenticationError,
+            0x1000 => DbError::Unavailable {
                 consistency: types::read_consistency(buf)?,
                 required: types::read_int(buf)?,
                 alive: types::read_int(buf)?,
             },
-            0x1001 => DBError::Overloaded,
-            0x1002 => DBError::IsBootstrapping,
-            0x1003 => DBError::TruncateError,
-            0x1100 => DBError::WriteTimeout {
+            0x1001 => DbError::Overloaded,
+            0x1002 => DbError::IsBootstrapping,
+            0x1003 => DbError::TruncateError,
+            0x1100 => DbError::WriteTimeout {
                 consistency: types::read_consistency(buf)?,
                 received: types::read_int(buf)?,
                 required: types::read_int(buf)?,
                 write_type: WriteType::from(types::read_string(buf)?),
             },
-            0x1200 => DBError::ReadTimeout {
+            0x1200 => DbError::ReadTimeout {
                 consistency: types::read_consistency(buf)?,
                 received: types::read_int(buf)?,
                 required: types::read_int(buf)?,
                 data_present: buf.read_u8()? != 0,
             },
-            0x1300 => DBError::ReadFailure {
+            0x1300 => DbError::ReadFailure {
                 consistency: types::read_consistency(buf)?,
                 received: types::read_int(buf)?,
                 required: types::read_int(buf)?,
                 numfailures: types::read_int(buf)?,
                 data_present: buf.read_u8()? != 0,
             },
-            0x1400 => DBError::FunctionFailure {
+            0x1400 => DbError::FunctionFailure {
                 keyspace: types::read_string(buf)?.to_string(),
                 function: types::read_string(buf)?.to_string(),
                 arg_types: types::read_string_list(buf)?,
             },
-            0x1500 => DBError::WriteFailure {
+            0x1500 => DbError::WriteFailure {
                 consistency: types::read_consistency(buf)?,
                 received: types::read_int(buf)?,
                 required: types::read_int(buf)?,
                 numfailures: types::read_int(buf)?,
                 write_type: WriteType::from(types::read_string(buf)?),
             },
-            0x2000 => DBError::SyntaxError,
-            0x2100 => DBError::Unauthorized,
-            0x2200 => DBError::Invalid,
-            0x2300 => DBError::ConfigError,
-            0x2400 => DBError::AlreadyExists {
+            0x2000 => DbError::SyntaxError,
+            0x2100 => DbError::Unauthorized,
+            0x2200 => DbError::Invalid,
+            0x2300 => DbError::ConfigError,
+            0x2400 => DbError::AlreadyExists {
                 keyspace: types::read_string(buf)?.to_string(),
                 table: types::read_string(buf)?.to_string(),
             },
-            0x2500 => DBError::Unprepared,
-            _ => DBError::Other(code),
+            0x2500 => DbError::Unprepared,
+            _ => DbError::Other(code),
         };
 
         Ok(Error { error, reason })
     }
 }
 
-impl Into<QueryError> for Error {
-    fn into(self) -> QueryError {
-        QueryError::DBError(self.error, self.reason)
+impl From<Error> for QueryError {
+    fn from(error: Error) -> QueryError {
+        QueryError::DbError(error.error, error.reason)
     }
 }
 
@@ -83,7 +83,7 @@ impl Into<QueryError> for Error {
 mod tests {
     use super::Error;
     use crate::statement::Consistency;
-    use crate::transport::errors::{DBError, WriteType};
+    use crate::transport::errors::{DbError, WriteType};
     use std::convert::TryInto;
 
     // Serializes the beginning of an ERROR response - error code and message
@@ -102,19 +102,19 @@ mod tests {
     // Tests deserialization of all errors without and additional data
     #[test]
     fn deserialize_simple_errors() {
-        let simple_error_mappings: [(i32, DBError); 12] = [
-            (0x0000, DBError::ServerError),
-            (0x000A, DBError::ProtocolError),
-            (0x0100, DBError::AuthenticationError),
-            (0x1001, DBError::Overloaded),
-            (0x1002, DBError::IsBootstrapping),
-            (0x1003, DBError::TruncateError),
-            (0x2000, DBError::SyntaxError),
-            (0x2100, DBError::Unauthorized),
-            (0x2200, DBError::Invalid),
-            (0x2300, DBError::ConfigError),
-            (0x2500, DBError::Unprepared),
-            (0x1234, DBError::Other(0x1234)),
+        let simple_error_mappings: [(i32, DbError); 12] = [
+            (0x0000, DbError::ServerError),
+            (0x000A, DbError::ProtocolError),
+            (0x0100, DbError::AuthenticationError),
+            (0x1001, DbError::Overloaded),
+            (0x1002, DbError::IsBootstrapping),
+            (0x1003, DbError::TruncateError),
+            (0x2000, DbError::SyntaxError),
+            (0x2100, DbError::Unauthorized),
+            (0x2200, DbError::Invalid),
+            (0x2300, DbError::ConfigError),
+            (0x2500, DbError::Unprepared),
+            (0x1234, DbError::Other(0x1234)),
         ];
 
         for (error_code, expected_error) in &simple_error_mappings {
@@ -136,7 +136,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::Unavailable {
+            DbError::Unavailable {
                 consistency: Consistency::One,
                 required: 2,
                 alive: 3,
@@ -161,7 +161,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::WriteTimeout {
+            DbError::WriteTimeout {
                 consistency: Consistency::Quorum,
                 received: -5, // Allow negative values when they don't make sense, it's better than crashing with ProtocolError
                 required: 100,
@@ -183,7 +183,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::ReadTimeout {
+            DbError::ReadTimeout {
                 consistency: Consistency::Two,
                 received: 8,
                 required: 32,
@@ -206,7 +206,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::ReadFailure {
+            DbError::ReadFailure {
                 consistency: Consistency::Three,
                 received: 4,
                 required: 5,
@@ -247,7 +247,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::FunctionFailure {
+            DbError::FunctionFailure {
                 keyspace: "keyspace_name".to_string(),
                 function: "function_name".to_string(),
                 arg_types: vec!["type1".to_string(), "type2".to_string()]
@@ -274,7 +274,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::WriteFailure {
+            DbError::WriteFailure {
                 consistency: Consistency::Any,
                 received: 2,
                 required: 4,
@@ -304,7 +304,7 @@ mod tests {
 
         assert_eq!(
             error.error,
-            DBError::AlreadyExists {
+            DbError::AlreadyExists {
                 keyspace: "keyspace_name".to_string(),
                 table: "table_name".to_string(),
             }
diff --git a/scylla/src/frame/response/result.rs b/scylla/src/frame/response/result.rs
index 4e53fdc2..2b3238ee 100644
--- a/scylla/src/frame/response/result.rs
+++ b/scylla/src/frame/response/result.rs
@@ -72,7 +72,7 @@ enum ColumnType {
 }
 
 #[derive(Debug, PartialEq)]
-pub enum CQLValue {
+pub enum CqlValue {
     Ascii(String),
     Boolean(bool),
     Blob(Vec<u8>),
@@ -89,25 +89,25 @@ pub enum CQLValue {
     /// Milliseconds since unix epoch
     Timestamp(Duration),
     Inet(IpAddr),
-    List(Vec<CQLValue>),
-    Map(Vec<(CQLValue, CQLValue)>),
-    Set(Vec<CQLValue>),
+    List(Vec<CqlValue>),
+    Map(Vec<(CqlValue, CqlValue)>),
+    Set(Vec<CqlValue>),
     UserDefinedType {
         keyspace: String,
         type_name: String,
-        fields: BTreeMap<String, Option<CQLValue>>,
+        fields: BTreeMap<String, Option<CqlValue>>,
     },
     SmallInt(i16),
     TinyInt(i8),
     /// Nanoseconds since midnight
     Time(Duration),
     Timeuuid(Uuid),
-    Tuple(Vec<CQLValue>),
+    Tuple(Vec<CqlValue>),
     Uuid(Uuid),
     Varint(BigInt),
 }
 
-impl CQLValue {
+impl CqlValue {
     pub fn as_ascii(&self) -> Option<&String> {
         match self {
             Self::Ascii(s) => Some(&s),
@@ -118,7 +118,7 @@ impl CQLValue {
     pub fn as_date(&self) -> Option<NaiveDate> {
         // Days since -5877641-06-23 i.e. 2^31 days before unix epoch
         let date_days: u32 = match self {
-            CQLValue::Date(days) => *days,
+            CqlValue::Date(days) => *days,
             _ => return None,
         };
 
@@ -237,21 +237,21 @@ impl CQLValue {
         }
     }
 
-    pub fn as_list(&self) -> Option<&Vec<CQLValue>> {
+    pub fn as_list(&self) -> Option<&Vec<CqlValue>> {
         match self {
             Self::List(s) => Some(&s),
             _ => None,
         }
     }
 
-    pub fn as_set(&self) -> Option<&Vec<CQLValue>> {
+    pub fn as_set(&self) -> Option<&Vec<CqlValue>> {
         match self {
             Self::Set(s) => Some(&s),
             _ => None,
         }
     }
 
-    pub fn into_vec(self) -> Option<Vec<CQLValue>> {
+    pub fn into_vec(self) -> Option<Vec<CqlValue>> {
         match self {
             Self::List(s) => Some(s),
             Self::Set(s) => Some(s),
@@ -259,7 +259,7 @@ impl CQLValue {
         }
     }
 
-    pub fn into_pair_vec(self) -> Option<Vec<(CQLValue, CQLValue)>> {
+    pub fn into_pair_vec(self) -> Option<Vec<(CqlValue, CqlValue)>> {
         match self {
             Self::Map(s) => Some(s),
             _ => None,
@@ -305,7 +305,7 @@ pub struct PreparedMetadata {
 
 #[derive(Debug, Default)]
 pub struct Row {
-    pub columns: Vec<Option<CQLValue>>,
+    pub columns: Vec<Option<CqlValue>>,
 }
 
 impl Row {
@@ -489,14 +489,14 @@ fn deser_prepared_metadata(buf: &mut &[u8]) -> StdResult<PreparedMetadata, Parse
     })
 }
 
-fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, ParseError> {
+fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CqlValue, ParseError> {
     use ColumnType::*;
     Ok(match typ {
         Ascii => {
             if !buf.is_ascii() {
                 return Err(ParseError::BadData("String is not ascii!".to_string()));
             }
-            CQLValue::Ascii(str::from_utf8(buf)?.to_owned())
+            CqlValue::Ascii(str::from_utf8(buf)?.to_owned())
         }
         Boolean => {
             if buf.len() != 1 {
@@ -505,9 +505,9 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::Boolean(buf[0] != 0x00)
+            CqlValue::Boolean(buf[0] != 0x00)
         }
-        Blob => CQLValue::Blob(buf.to_vec()),
+        Blob => CqlValue::Blob(buf.to_vec()),
         Date => {
             if buf.len() != 4 {
                 return Err(ParseError::BadData(format!(
@@ -517,7 +517,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
             }
 
             let date_value = buf.read_u32::<BigEndian>()?;
-            CQLValue::Date(date_value)
+            CqlValue::Date(date_value)
         }
         Counter => {
             if buf.len() != 8 {
@@ -526,14 +526,14 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::Counter(crate::frame::value::Counter(buf.read_i64::<BigEndian>()?))
+            CqlValue::Counter(crate::frame::value::Counter(buf.read_i64::<BigEndian>()?))
         }
         Decimal => {
             let scale = types::read_int(buf)? as i64;
             let int_value = num_bigint::BigInt::from_signed_bytes_be(buf);
             let big_decimal: BigDecimal = BigDecimal::from((int_value, scale));
 
-            CQLValue::Decimal(big_decimal)
+            CqlValue::Decimal(big_decimal)
         }
         Double => {
             if buf.len() != 8 {
@@ -542,7 +542,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::Double(buf.read_f64::<BigEndian>()?)
+            CqlValue::Double(buf.read_f64::<BigEndian>()?)
         }
         Float => {
             if buf.len() != 4 {
@@ -551,7 +551,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::Float(buf.read_f32::<BigEndian>()?)
+            CqlValue::Float(buf.read_f32::<BigEndian>()?)
         }
         Int => {
             if buf.len() != 4 {
@@ -560,7 +560,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::Int(buf.read_i32::<BigEndian>()?)
+            CqlValue::Int(buf.read_i32::<BigEndian>()?)
         }
         SmallInt => {
             if buf.len() != 2 {
@@ -570,7 +570,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 )));
             }
 
-            CQLValue::SmallInt(buf.read_i16::<BigEndian>()?)
+            CqlValue::SmallInt(buf.read_i16::<BigEndian>()?)
         }
         TinyInt => {
             if buf.len() != 1 {
@@ -579,7 +579,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::TinyInt(buf.read_i8()?)
+            CqlValue::TinyInt(buf.read_i8()?)
         }
         BigInt => {
             if buf.len() != 8 {
@@ -588,9 +588,9 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                     buf.len()
                 )));
             }
-            CQLValue::BigInt(buf.read_i64::<BigEndian>()?)
+            CqlValue::BigInt(buf.read_i64::<BigEndian>()?)
         }
-        Text => CQLValue::Text(str::from_utf8(buf)?.to_owned()),
+        Text => CqlValue::Text(str::from_utf8(buf)?.to_owned()),
         Timestamp => {
             if buf.len() != 8 {
                 return Err(ParseError::BadData(format!(
@@ -600,7 +600,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
             }
             let millis = buf.read_i64::<BigEndian>()?;
 
-            CQLValue::Timestamp(Duration::milliseconds(millis))
+            CqlValue::Timestamp(Duration::milliseconds(millis))
         }
         Time => {
             if buf.len() != 8 {
@@ -618,7 +618,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 }));
             }
 
-            CQLValue::Time(Duration::nanoseconds(nanoseconds))
+            CqlValue::Time(Duration::nanoseconds(nanoseconds))
         }
         Timeuuid => {
             if buf.len() != 16 {
@@ -628,9 +628,9 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 )));
             }
             let uuid = uuid::Uuid::from_slice(buf).expect("Deserializing Uuid failed.");
-            CQLValue::Timeuuid(uuid)
+            CqlValue::Timeuuid(uuid)
         }
-        Inet => CQLValue::Inet(match buf.len() {
+        Inet => CqlValue::Inet(match buf.len() {
             4 => {
                 let ret = IpAddr::from(<[u8; 4]>::try_from(&buf[0..4])?);
                 buf.advance(4);
@@ -656,9 +656,9 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 )));
             }
             let uuid = uuid::Uuid::from_slice(buf).expect("Deserializing Uuid failed.");
-            CQLValue::Uuid(uuid)
+            CqlValue::Uuid(uuid)
         }
-        Varint => CQLValue::Varint(num_bigint::BigInt::from_signed_bytes_be(buf)),
+        Varint => CqlValue::Varint(num_bigint::BigInt::from_signed_bytes_be(buf)),
         List(type_name) => {
             let len: usize = types::read_int(buf)?.try_into()?;
             let mut res = Vec::with_capacity(len);
@@ -666,7 +666,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 let mut b = types::read_bytes(buf)?;
                 res.push(deser_cql_value(type_name, &mut b)?);
             }
-            CQLValue::List(res)
+            CqlValue::List(res)
         }
         Map(key_type, value_type) => {
             let len: usize = types::read_int(buf)?.try_into()?;
@@ -678,7 +678,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 let val = deser_cql_value(value_type, &mut b)?;
                 res.push((key, val));
             }
-            CQLValue::Map(res)
+            CqlValue::Map(res)
         }
         Set(type_name) => {
             let len: usize = types::read_int(buf)?.try_into()?;
@@ -688,17 +688,17 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 let mut b = types::read_bytes(buf)?;
                 res.push(deser_cql_value(type_name, &mut b)?);
             }
-            CQLValue::Set(res)
+            CqlValue::Set(res)
         }
         UserDefinedType {
             type_name,
             keyspace,
             field_types,
         } => {
-            let mut fields: BTreeMap<String, Option<CQLValue>> = BTreeMap::new();
+            let mut fields: BTreeMap<String, Option<CqlValue>> = BTreeMap::new();
 
             for (field_name, field_type) in field_types {
-                let mut field_value: Option<CQLValue> = None;
+                let mut field_value: Option<CqlValue> = None;
                 if let Some(mut field_val_bytes) = types::read_bytes_opt(buf)? {
                     field_value = Some(deser_cql_value(&field_type, &mut field_val_bytes)?);
                 }
@@ -706,7 +706,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 fields.insert(field_name.clone(), field_value);
             }
 
-            CQLValue::UserDefinedType {
+            CqlValue::UserDefinedType {
                 keyspace: keyspace.clone(),
                 type_name: type_name.clone(),
                 fields,
@@ -718,7 +718,7 @@ fn deser_cql_value(typ: &ColumnType, buf: &mut &[u8]) -> StdResult<CQLValue, Par
                 let mut b = types::read_bytes(buf)?;
                 res.push(deser_cql_value(type_name, &mut b)?);
             }
-            CQLValue::Tuple(res)
+            CqlValue::Tuple(res)
         }
     })
 }
@@ -804,19 +804,18 @@ mod tests {
     use chrono::NaiveDate;
     use num_bigint::BigInt;
     use num_bigint::ToBigInt;
-    use scylla::frame::response::result::{CQLValue, ColumnType};
+    use scylla::frame::response::result::{ColumnType, CqlValue};
     use std::str::FromStr;
     use uuid::Uuid;
 
     #[test]
     fn test_deserialize_text_types() {
-        let mut buf = Vec::<u8>::new();
-        buf.push(0x41);
+        let buf: Vec<u8> = vec![0x41];
         let int_slice = &mut &buf[..];
         let ascii_serialized = super::deser_cql_value(&ColumnType::Ascii, int_slice).unwrap();
         let text_serialized = super::deser_cql_value(&ColumnType::Text, int_slice).unwrap();
-        assert_eq!(ascii_serialized, CQLValue::Ascii("A".to_string()));
-        assert_eq!(text_serialized, CQLValue::Text("A".to_string()));
+        assert_eq!(ascii_serialized, CqlValue::Ascii("A".to_string()));
+        assert_eq!(text_serialized, CqlValue::Text("A".to_string()));
     }
 
     #[test]
@@ -826,17 +825,17 @@ mod tests {
         let uuid_buf: Vec<u8> = vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
         let uuid_slice = &mut &uuid_buf[..];
         let uuid_serialize = super::deser_cql_value(&ColumnType::Uuid, uuid_slice).unwrap();
-        assert_eq!(uuid_serialize, CQLValue::Uuid(my_uuid));
+        assert_eq!(uuid_serialize, CqlValue::Uuid(my_uuid));
 
         let time_uuid_serialize =
             super::deser_cql_value(&ColumnType::Timeuuid, uuid_slice).unwrap();
-        assert_eq!(time_uuid_serialize, CQLValue::Timeuuid(my_uuid));
+        assert_eq!(time_uuid_serialize, CqlValue::Timeuuid(my_uuid));
 
         let my_ip = "::1".parse().unwrap();
         let ip_buf: Vec<u8> = vec![0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
         let ip_slice = &mut &ip_buf[..];
         let ip_serialize = super::deser_cql_value(&ColumnType::Inet, ip_slice).unwrap();
-        assert_eq!(ip_serialize, CQLValue::Inet(my_ip));
+        assert_eq!(ip_serialize, CqlValue::Inet(my_ip));
 
         let max_ip = "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff".parse().unwrap();
         let max_ip_buf: Vec<u8> = vec![
@@ -844,7 +843,7 @@ mod tests {
         ];
         let max_ip_slice = &mut &max_ip_buf[..];
         let max_ip_serialize = super::deser_cql_value(&ColumnType::Inet, max_ip_slice).unwrap();
-        assert_eq!(max_ip_serialize, CQLValue::Inet(max_ip));
+        assert_eq!(max_ip_serialize, CqlValue::Inet(max_ip));
     }
 
     #[test]
@@ -855,12 +854,12 @@ mod tests {
         let float_buf: Vec<u8> = vec![63, 0, 0, 0];
         let float_slice = &mut &float_buf[..];
         let float_serialize = super::deser_cql_value(&ColumnType::Float, float_slice).unwrap();
-        assert_eq!(float_serialize, CQLValue::Float(float));
+        assert_eq!(float_serialize, CqlValue::Float(float));
 
         let double_buf: Vec<u8> = vec![64, 0, 0, 0, 0, 0, 0, 0];
         let double_slice = &mut &double_buf[..];
         let double_serialize = super::deser_cql_value(&ColumnType::Double, double_slice).unwrap();
-        assert_eq!(double_serialize, CQLValue::Double(double));
+        assert_eq!(double_serialize, CqlValue::Double(double));
     }
 
     #[test]
@@ -920,8 +919,8 @@ mod tests {
         ];
 
         for t in tests.iter() {
-            let value = super::deser_cql_value(&ColumnType::Varint, &mut &t.encoding[..]).unwrap();
-            assert_eq!(CQLValue::Varint(t.value.clone()), value);
+            let value = super::deser_cql_value(&ColumnType::Varint, &mut &*t.encoding).unwrap();
+            assert_eq!(CqlValue::Varint(t.value.clone()), value);
         }
     }
 
@@ -952,8 +951,8 @@ mod tests {
         ];
 
         for t in tests.iter() {
-            let value = super::deser_cql_value(&ColumnType::Decimal, &mut &t.encoding[..]).unwrap();
-            assert_eq!(CQLValue::Decimal(t.value.clone()), value);
+            let value = super::deser_cql_value(&ColumnType::Decimal, &mut &*t.encoding).unwrap();
+            assert_eq!(CqlValue::Decimal(t.value.clone()), value);
         }
     }
 
@@ -963,7 +962,7 @@ mod tests {
         let counter_slice = &mut &counter[..];
         let counter_serialize =
             super::deser_cql_value(&ColumnType::Counter, counter_slice).unwrap();
-        assert_eq!(counter_serialize, CQLValue::Counter(Counter(256)));
+        assert_eq!(counter_serialize, CqlValue::Counter(Counter(256)));
     }
 
     #[test]
@@ -971,7 +970,7 @@ mod tests {
         let blob: Vec<u8> = vec![0, 1, 2, 3];
         let blob_slice = &mut &blob[..];
         let blob_serialize = super::deser_cql_value(&ColumnType::Blob, blob_slice).unwrap();
-        assert_eq!(blob_serialize, CQLValue::Blob(blob));
+        assert_eq!(blob_serialize, CqlValue::Blob(blob));
     }
 
     #[test]
@@ -979,12 +978,12 @@ mod tests {
         let bool_buf: Vec<u8> = vec![0x00];
         let bool_slice = &mut &bool_buf[..];
         let bool_serialize = super::deser_cql_value(&ColumnType::Boolean, bool_slice).unwrap();
-        assert_eq!(bool_serialize, CQLValue::Boolean(false));
+        assert_eq!(bool_serialize, CqlValue::Boolean(false));
 
         let bool_buf: Vec<u8> = vec![0x01];
         let bool_slice = &mut &bool_buf[..];
         let bool_serialize = super::deser_cql_value(&ColumnType::Boolean, bool_slice).unwrap();
-        assert_eq!(bool_serialize, CQLValue::Boolean(true));
+        assert_eq!(bool_serialize, CqlValue::Boolean(true));
     }
 
     #[test]
@@ -992,91 +991,83 @@ mod tests {
         let int_buf: Vec<u8> = vec![0, 0, 0, 4];
         let int_slice = &mut &int_buf[..];
         let int_serialized = super::deser_cql_value(&ColumnType::Int, int_slice).unwrap();
-        assert_eq!(int_serialized, CQLValue::Int(4));
+        assert_eq!(int_serialized, CqlValue::Int(4));
 
         let smallint_buf: Vec<u8> = vec![0, 4];
         let smallint_slice = &mut &smallint_buf[..];
         let smallint_serialized =
             super::deser_cql_value(&ColumnType::SmallInt, smallint_slice).unwrap();
-        assert_eq!(smallint_serialized, CQLValue::SmallInt(4));
+        assert_eq!(smallint_serialized, CqlValue::SmallInt(4));
 
         let tinyint_buf: Vec<u8> = vec![4];
         let tinyint_slice = &mut &tinyint_buf[..];
         let tinyint_serialized =
             super::deser_cql_value(&ColumnType::TinyInt, tinyint_slice).unwrap();
-        assert_eq!(tinyint_serialized, CQLValue::TinyInt(4));
+        assert_eq!(tinyint_serialized, CqlValue::TinyInt(4));
 
         let bigint_buf: Vec<u8> = vec![0, 0, 0, 0, 0, 0, 0, 4];
         let bigint_slice = &mut &bigint_buf[..];
         let bigint_serialized = super::deser_cql_value(&ColumnType::BigInt, bigint_slice).unwrap();
-        assert_eq!(bigint_serialized, CQLValue::BigInt(4));
+        assert_eq!(bigint_serialized, CqlValue::BigInt(4));
     }
 
     #[test]
     fn test_list_from_cql() {
-        let mut my_vec: Vec<CQLValue> = Vec::new();
+        let my_vec: Vec<CqlValue> = vec![CqlValue::Int(20), CqlValue::Int(2), CqlValue::Int(13)];
 
-        my_vec.push(CQLValue::Int(20));
-        my_vec.push(CQLValue::Int(2));
-        my_vec.push(CQLValue::Int(13));
-
-        let cql: CQLValue = CQLValue::List(my_vec);
+        let cql: CqlValue = CqlValue::List(my_vec);
         let decoded = cql.into_vec().unwrap();
 
-        assert_eq!(decoded[0], CQLValue::Int(20));
-        assert_eq!(decoded[1], CQLValue::Int(2));
-        assert_eq!(decoded[2], CQLValue::Int(13));
+        assert_eq!(decoded[0], CqlValue::Int(20));
+        assert_eq!(decoded[1], CqlValue::Int(2));
+        assert_eq!(decoded[2], CqlValue::Int(13));
     }
 
     #[test]
     fn test_set_from_cql() {
-        let mut my_vec: Vec<CQLValue> = Vec::new();
-
-        my_vec.push(CQLValue::Int(20));
-        my_vec.push(CQLValue::Int(2));
-        my_vec.push(CQLValue::Int(13));
+        let my_vec: Vec<CqlValue> = vec![CqlValue::Int(20), CqlValue::Int(2), CqlValue::Int(13)];
 
-        let cql: CQLValue = CQLValue::Set(my_vec);
+        let cql: CqlValue = CqlValue::Set(my_vec);
         let decoded = cql.as_set().unwrap();
 
-        assert_eq!(decoded[0], CQLValue::Int(20));
-        assert_eq!(decoded[1], CQLValue::Int(2));
-        assert_eq!(decoded[2], CQLValue::Int(13));
+        assert_eq!(decoded[0], CqlValue::Int(20));
+        assert_eq!(decoded[1], CqlValue::Int(2));
+        assert_eq!(decoded[2], CqlValue::Int(13));
     }
 
     #[test]
     fn test_map_from_cql() {
-        let mut my_vec: Vec<(CQLValue, CQLValue)> = Vec::new();
-
-        my_vec.push((CQLValue::Int(20), CQLValue::Int(21)));
-        my_vec.push((CQLValue::Int(2), CQLValue::Int(3)));
+        let my_vec: Vec<(CqlValue, CqlValue)> = vec![
+            (CqlValue::Int(20), CqlValue::Int(21)),
+            (CqlValue::Int(2), CqlValue::Int(3)),
+        ];
 
-        let cql: CQLValue = CQLValue::Map(my_vec);
+        let cql: CqlValue = CqlValue::Map(my_vec);
 
         let decoded = cql.into_pair_vec().unwrap();
 
-        assert_eq!(CQLValue::Int(20), decoded[0].0);
-        assert_eq!(CQLValue::Int(21), decoded[0].1);
+        assert_eq!(CqlValue::Int(20), decoded[0].0);
+        assert_eq!(CqlValue::Int(21), decoded[0].1);
 
-        assert_eq!(CQLValue::Int(2), decoded[1].0);
-        assert_eq!(CQLValue::Int(3), decoded[1].1);
+        assert_eq!(CqlValue::Int(2), decoded[1].0);
+        assert_eq!(CqlValue::Int(3), decoded[1].1);
     }
 
     #[test]
     fn date_deserialize() {
         // Date is correctly parsed from a 4 byte array
         let four_bytes: [u8; 4] = [12, 23, 34, 45];
-        let date: CQLValue =
+        let date: CqlValue =
             super::deser_cql_value(&ColumnType::Date, &mut four_bytes.as_ref()).unwrap();
-        assert_eq!(date, CQLValue::Date(u32::from_be_bytes(four_bytes)));
+        assert_eq!(date, CqlValue::Date(u32::from_be_bytes(four_bytes)));
 
         // Date is parsed as u32 not i32, u32::max_value() is u32::max_value()
-        let date: CQLValue = super::deser_cql_value(
+        let date: CqlValue = super::deser_cql_value(
             &ColumnType::Date,
             &mut u32::max_value().to_be_bytes().as_ref(),
         )
         .unwrap();
-        assert_eq!(date, CQLValue::Date(u32::max_value()));
+        assert_eq!(date, CqlValue::Date(u32::max_value()));
 
         // Trying to parse a 0, 3 or 5 byte array fails
         super::deser_cql_value(&ColumnType::Date, &mut [].as_ref()).unwrap_err();
@@ -1085,7 +1076,7 @@ mod tests {
 
         // 2^31 when converted to NaiveDate is 1970-01-01
         let unix_epoch: NaiveDate = NaiveDate::from_ymd(1970, 1, 1);
-        let date: CQLValue =
+        let date: CqlValue =
             super::deser_cql_value(&ColumnType::Date, &mut 2_u32.pow(31).to_be_bytes().as_ref())
                 .unwrap();
 
@@ -1093,7 +1084,7 @@ mod tests {
 
         // 2^31 - 30 when converted to NaiveDate is 1969-12-02
         let before_epoch: NaiveDate = NaiveDate::from_ymd(1969, 12, 2);
-        let date: CQLValue = super::deser_cql_value(
+        let date: CqlValue = super::deser_cql_value(
             &ColumnType::Date,
             &mut (2_u32.pow(31) - 30).to_be_bytes().as_ref(),
         )
@@ -1103,7 +1094,7 @@ mod tests {
 
         // 2^31 + 30 when converted to NaiveDate is 1970-01-31
         let after_epoch: NaiveDate = NaiveDate::from_ymd(1970, 1, 31);
-        let date: CQLValue = super::deser_cql_value(
+        let date: CqlValue = super::deser_cql_value(
             &ColumnType::Date,
             &mut (2_u32.pow(31) + 30).to_be_bytes().as_ref(),
         )
@@ -1142,9 +1133,9 @@ mod tests {
         // Check that basic values are deserialized correctly
         for test_val in [0, 1, 18463, max_time].iter() {
             let bytes: [u8; 8] = test_val.to_be_bytes();
-            let cql_value: CQLValue =
+            let cql_value: CqlValue =
                 super::deser_cql_value(&ColumnType::Time, &mut &bytes[..]).unwrap();
-            assert_eq!(cql_value, CQLValue::Time(Duration::nanoseconds(*test_val)));
+            assert_eq!(cql_value, CqlValue::Time(Duration::nanoseconds(*test_val)));
         }
 
         // Negative values cause an error
@@ -1183,11 +1174,11 @@ mod tests {
             i64::max_value(),
         ] {
             let bytes: [u8; 8] = test_val.to_be_bytes();
-            let cql_value: CQLValue =
+            let cql_value: CqlValue =
                 super::deser_cql_value(&ColumnType::Timestamp, &mut &bytes[..]).unwrap();
             assert_eq!(
                 cql_value,
-                CQLValue::Timestamp(Duration::milliseconds(*test_val))
+                CqlValue::Timestamp(Duration::milliseconds(*test_val))
             );
 
             // Check that Duration converted back to i64 is correct
@@ -1223,15 +1214,15 @@ mod tests {
         ];
 
         for (uuid_str, uuid_bytes) in &tests {
-            let cql_val: CQLValue =
+            let cql_val: CqlValue =
                 super::deser_cql_value(&ColumnType::Timeuuid, &mut &uuid_bytes[..]).unwrap();
 
             match cql_val {
-                CQLValue::Timeuuid(uuid) => {
+                CqlValue::Timeuuid(uuid) => {
                     assert_eq!(uuid.as_bytes(), uuid_bytes);
                     assert_eq!(Uuid::parse_str(uuid_str).unwrap(), uuid);
                 }
-                _ => panic!("Timeuuid parsed as wrong CQLValue"),
+                _ => panic!("Timeuuid parsed as wrong CqlValue"),
             }
         }
     }
diff --git a/scylla/src/frame/types.rs b/scylla/src/frame/types.rs
index 04be5144..f1873acc 100644
--- a/scylla/src/frame/types.rs
+++ b/scylla/src/frame/types.rs
@@ -321,10 +321,12 @@ pub fn write_string_list(v: &[String], buf: &mut impl BufMut) -> Result<(), Pars
 
 #[test]
 fn type_string_list() {
-    let mut val = Vec::new();
-    val.push("".to_owned());
-    val.push("CQL_VERSION".to_owned());
-    val.push("THROW_ON_OVERLOAD".to_owned());
+    let val = vec![
+        "".to_owned(),
+        "CQL_VERSION".to_owned(),
+        "THROW_ON_OVERLOAD".to_owned(),
+    ];
+
     let mut buf = Vec::new();
     write_string_list(&val, &mut buf).unwrap();
     assert_eq!(read_string_list(&mut &buf[..]).unwrap(), val);
diff --git a/scylla/src/transport/cluster.rs b/scylla/src/transport/cluster.rs
index 140a5eb1..c769bdcc 100644
--- a/scylla/src/transport/cluster.rs
+++ b/scylla/src/transport/cluster.rs
@@ -355,11 +355,11 @@ impl ClusterWorker {
         let use_keyspace_results: Vec<Result<(), QueryError>> =
             join_all(use_keyspace_futures).await;
 
-        // If there was at least one Ok and the rest were IOErrors we can return Ok
+        // If there was at least one Ok and the rest were IoErrors we can return Ok
         // keyspace name is correct and will be used on broken connection on the next reconnect
 
-        // If there were only IOErrors then return IOError
-        // If there was an error different than IOError return this error - something is wrong
+        // If there were only IoErrors then return IoError
+        // If there was an error different than IoError return this error - something is wrong
 
         let mut was_ok: bool = false;
         let mut io_error: Option<Arc<std::io::Error>> = None;
@@ -368,7 +368,7 @@ impl ClusterWorker {
             match result {
                 Ok(()) => was_ok = true,
                 Err(err) => match err {
-                    QueryError::IOError(io_err) => io_error = Some(io_err),
+                    QueryError::IoError(io_err) => io_error = Some(io_err),
                     _ => return Err(err),
                 },
             }
@@ -379,7 +379,7 @@ impl ClusterWorker {
         }
 
         // We can unwrap io_error because use_keyspace_futures must be nonempty
-        return Err(QueryError::IOError(io_error.unwrap()));
+        return Err(QueryError::IoError(io_error.unwrap()));
     }
 
     async fn perform_refresh(&mut self) -> Result<(), QueryError> {
diff --git a/scylla/src/transport/connection.rs b/scylla/src/transport/connection.rs
index bd15df0c..8f34cbce 100644
--- a/scylla/src/transport/connection.rs
+++ b/scylla/src/transport/connection.rs
@@ -15,7 +15,7 @@ use std::{
     net::{Ipv4Addr, Ipv6Addr},
 };
 
-use super::errors::{BadKeyspaceName, BadQuery, DBError, QueryError};
+use super::errors::{BadKeyspaceName, BadQuery, DbError, QueryError};
 
 use crate::batch::{Batch, BatchStatement};
 use crate::frame::{
@@ -234,7 +234,7 @@ impl Connection {
         let response = self.send_request(&execute_frame, true).await?;
 
         if let Response::Error(err) = &response {
-            if err.error == DBError::Unprepared {
+            if err.error == DbError::Unprepared {
                 // Repreparation of a statement is needed
                 let reprepared = self.prepare(prepared_statement.get_statement()).await?;
                 // Reprepared statement should keep its id - it's the md5 sum
@@ -349,14 +349,14 @@ impl Connection {
             })
             .await
             .map_err(|_| {
-                QueryError::IOError(Arc::new(std::io::Error::new(
+                QueryError::IoError(Arc::new(std::io::Error::new(
                     ErrorKind::Other,
                     "Connection broken",
                 )))
             })?;
 
         let task_response = receiver.await.map_err(|_| {
-            QueryError::IOError(Arc::new(std::io::Error::new(
+            QueryError::IoError(Arc::new(std::io::Error::new(
                 ErrorKind::Other,
                 "Connection broken",
             )))
@@ -638,14 +638,14 @@ async fn connect_with_source_port(
 }
 
 struct ResponseHandlerMap {
-    stream_set: StreamIDSet,
+    stream_set: StreamIdSet,
     handlers: HashMap<i16, ResponseHandler>,
 }
 
 impl ResponseHandlerMap {
     pub fn new() -> Self {
         Self {
-            stream_set: StreamIDSet::new(),
+            stream_set: StreamIdSet::new(),
             handlers: HashMap::new(),
         }
     }
@@ -669,11 +669,11 @@ impl ResponseHandlerMap {
     }
 }
 
-struct StreamIDSet {
+struct StreamIdSet {
     used_bitmap: Box<[u64]>,
 }
 
-impl StreamIDSet {
+impl StreamIdSet {
     pub fn new() -> Self {
         const BITMAP_SIZE: usize = (std::i16::MAX as usize + 1) / 64;
         Self {
diff --git a/scylla/src/transport/connection_keeper.rs b/scylla/src/transport/connection_keeper.rs
index 0e54b198..dc56f1c1 100644
--- a/scylla/src/transport/connection_keeper.rs
+++ b/scylla/src/transport/connection_keeper.rs
@@ -222,7 +222,7 @@ impl ConnectionKeeperWorker {
             // user gets all errors from session.use_keyspace()
         }
 
-        let connection_closed_error = QueryError::IOError(Arc::new(std::io::Error::new(
+        let connection_closed_error = QueryError::IoError(Arc::new(std::io::Error::new(
             ErrorKind::Other,
             "Connection closed",
         )));
@@ -277,7 +277,7 @@ impl ConnectionKeeperWorker {
         }
 
         // Tried all source ports for that shard, give up
-        return Err(QueryError::IOError(Arc::new(std::io::Error::new(
+        return Err(QueryError::IoError(Arc::new(std::io::Error::new(
             std::io::ErrorKind::AddrInUse,
             "Could not find free source port for shard",
         ))));
diff --git a/scylla/src/transport/errors.rs b/scylla/src/transport/errors.rs
index 4fc1fec1..dcffbb7c 100644
--- a/scylla/src/transport/errors.rs
+++ b/scylla/src/transport/errors.rs
@@ -10,7 +10,7 @@ use thiserror::Error;
 pub enum QueryError {
     /// Database sent a response containing some error with a message
     #[error("Database returned an error: {0}, Error message: {1}")]
-    DBError(DBError, String),
+    DbError(DbError, String),
 
     /// Caller passed an invalid query
     #[error(transparent)]
@@ -18,7 +18,7 @@ pub enum QueryError {
 
     /// Input/Output error has occured, connection broken etc.
     #[error("IO Error: {0}")]
-    IOError(Arc<std::io::Error>),
+    IoError(Arc<std::io::Error>),
 
     /// Unexpected or invalid message received
     #[error("Protocol Error: {0}")]
@@ -28,7 +28,7 @@ pub enum QueryError {
 /// An error sent from the database in response to a query
 /// as described in the [specification](https://github.com/apache/cassandra/blob/5ed5e84613ef0e9664a774493db7d2604e3596e0/doc/native_protocol_v4.spec#L1029)  
 #[derive(Error, Debug, Clone, PartialEq, Eq)]
-pub enum DBError {
+pub enum DbError {
     /// The submitted query has a syntax error
     #[error("The submitted query has a syntax error")]
     SyntaxError,
@@ -201,11 +201,11 @@ pub enum WriteType {
     /// Timeout occured during the write to the batch log when a logged batch was requested
     BatchLog,
     /// Timeout occured during Compare And Set write/update
-    CAS,
+    Cas,
     /// Write involves VIEW update and failure to acquire local view(MV) lock for key within timeout
     View,
     /// Timeout occured  when a cdc_total_space_in_mb is exceeded when doing a write to data tracked by cdc
-    CDC,
+    Cdc,
     /// Other type not specified in the specification
     Other(String),
 }
@@ -245,7 +245,7 @@ pub enum NewSessionError {
 
     /// Database sent a response containing some error with a message
     #[error("Database returned an error: {0}, Error message: {1}")]
-    DBError(DBError, String),
+    DbError(DbError, String),
 
     /// Caller passed an invalid query
     #[error(transparent)]
@@ -253,7 +253,7 @@ pub enum NewSessionError {
 
     /// Input/Output error has occured, connection broken etc.
     #[error("IO Error: {0}")]
-    IOError(Arc<std::io::Error>),
+    IoError(Arc<std::io::Error>),
 
     /// Unexpected or invalid message received
     #[error("Protocol Error: {0}")]
@@ -284,7 +284,7 @@ impl std::fmt::Display for WriteType {
 
 impl From<std::io::Error> for QueryError {
     fn from(io_error: std::io::Error) -> QueryError {
-        QueryError::IOError(Arc::new(io_error))
+        QueryError::IoError(Arc::new(io_error))
     }
 }
 
@@ -308,16 +308,16 @@ impl From<FrameError> for QueryError {
 
 impl From<std::io::Error> for NewSessionError {
     fn from(io_error: std::io::Error) -> NewSessionError {
-        NewSessionError::IOError(Arc::new(io_error))
+        NewSessionError::IoError(Arc::new(io_error))
     }
 }
 
 impl From<QueryError> for NewSessionError {
     fn from(query_error: QueryError) -> NewSessionError {
         match query_error {
-            QueryError::DBError(e, msg) => NewSessionError::DBError(e, msg),
+            QueryError::DbError(e, msg) => NewSessionError::DbError(e, msg),
             QueryError::BadQuery(e) => NewSessionError::BadQuery(e),
-            QueryError::IOError(e) => NewSessionError::IOError(e),
+            QueryError::IoError(e) => NewSessionError::IoError(e),
             QueryError::ProtocolError(m) => NewSessionError::ProtocolError(m),
         }
     }
@@ -334,7 +334,7 @@ impl QueryError {
     /// This type of error often occurs when we are choosing random port numbers
     /// and there is a collision.
     pub(crate) fn is_address_in_use(&self) -> bool {
-        if let QueryError::IOError(io_error) = self {
+        if let QueryError::IoError(io_error) = self {
             if io_error.kind() == ErrorKind::AddrInUse {
                 return true;
             }
@@ -352,9 +352,9 @@ impl From<&str> for WriteType {
             "UNLOGGED_BATCH" => WriteType::UnloggedBatch,
             "COUNTER" => WriteType::Counter,
             "BATCH_LOG" => WriteType::BatchLog,
-            "CAS" => WriteType::CAS,
+            "CAS" => WriteType::Cas,
             "VIEW" => WriteType::View,
-            "CDC" => WriteType::CDC,
+            "CDC" => WriteType::Cdc,
             _ => WriteType::Other(write_type_str.to_string()),
         }
     }
@@ -362,7 +362,7 @@ impl From<&str> for WriteType {
 
 #[cfg(test)]
 mod tests {
-    use super::{DBError, QueryError, WriteType};
+    use super::{DbError, QueryError, WriteType};
     use crate::statement::Consistency;
 
     #[test]
@@ -373,9 +373,9 @@ mod tests {
             ("UNLOGGED_BATCH", WriteType::UnloggedBatch),
             ("COUNTER", WriteType::Counter),
             ("BATCH_LOG", WriteType::BatchLog),
-            ("CAS", WriteType::CAS),
+            ("CAS", WriteType::Cas),
             ("VIEW", WriteType::View),
-            ("CDC", WriteType::CDC),
+            ("CDC", WriteType::Cdc),
             ("SOMEOTHER", WriteType::Other("SOMEOTHER".to_string())),
         ];
 
@@ -385,15 +385,15 @@ mod tests {
         }
     }
 
-    // A test to check that displaying DBError and QueryError::DBError works as expected
+    // A test to check that displaying DbError and QueryError::DbError works as expected
     // - displays error description
     // - displays error parameters
     // - displays error message
     // - indented multiline strings dont cause whitespace gaps
     #[test]
     fn dberror_full_info() {
-        // Test that DBError::Unavailable is displayed correctly
-        let db_error = DBError::Unavailable {
+        // Test that DbError::Unavailable is displayed correctly
+        let db_error = DbError::Unavailable {
             consistency: Consistency::Three,
             required: 3,
             alive: 2,
@@ -407,9 +407,9 @@ mod tests {
 
         assert_eq!(db_error_displayed, expected_dberr_msg);
 
-        // Test that QueryError::DBError::(DBError::Unavailable) is displayed correctly
+        // Test that QueryError::DbError::(DbError::Unavailable) is displayed correctly
         let query_error =
-            QueryError::DBError(db_error, "a message about unavailable error".to_string());
+            QueryError::DbError(db_error, "a message about unavailable error".to_string());
         let query_error_displayed: String = format!("{}", query_error);
 
         let mut expected_querr_msg = "Database returned an error: ".to_string();
diff --git a/scylla/src/transport/load_balancing/dc_aware_round_robin.rs b/scylla/src/transport/load_balancing/dc_aware_round_robin.rs
index bd1e5b35..ead329dc 100644
--- a/scylla/src/transport/load_balancing/dc_aware_round_robin.rs
+++ b/scylla/src/transport/load_balancing/dc_aware_round_robin.rs
@@ -7,12 +7,12 @@ use std::sync::{
 };
 
 /// A data-center aware Round-robin load balancing policy.
-pub struct DCAwareRoundRobinPolicy {
+pub struct DcAwareRoundRobinPolicy {
     index: AtomicUsize,
     local_dc: String,
 }
 
-impl DCAwareRoundRobinPolicy {
+impl DcAwareRoundRobinPolicy {
     pub fn new(local_dc: String) -> Self {
         Self {
             index: AtomicUsize::new(0),
@@ -43,14 +43,14 @@ impl DCAwareRoundRobinPolicy {
             .all_nodes
             .iter()
             .cloned()
-            .filter(move |node| !DCAwareRoundRobinPolicy::is_local_node(node, &local_dc))
+            .filter(move |node| !DcAwareRoundRobinPolicy::is_local_node(node, &local_dc))
     }
 }
 
 const EMPTY_NODE_LIST: &Vec<Arc<Node>> = &vec![];
 const ORDER_TYPE: Ordering = Ordering::Relaxed;
 
-impl LoadBalancingPolicy for DCAwareRoundRobinPolicy {
+impl LoadBalancingPolicy for DcAwareRoundRobinPolicy {
     fn plan<'a>(
         &self,
         _statement: &Statement,
@@ -73,11 +73,11 @@ impl LoadBalancingPolicy for DCAwareRoundRobinPolicy {
     }
 
     fn name(&self) -> String {
-        "DCAwareRoundRobinPolicy".to_string()
+        "DcAwareRoundRobinPolicy".to_string()
     }
 }
 
-impl ChildLoadBalancingPolicy for DCAwareRoundRobinPolicy {
+impl ChildLoadBalancingPolicy for DcAwareRoundRobinPolicy {
     fn apply_child_policy(
         &self,
         plan: Vec<Arc<Node>>,
@@ -86,7 +86,7 @@ impl ChildLoadBalancingPolicy for DCAwareRoundRobinPolicy {
 
         let (local_nodes, remote_nodes): (Vec<_>, Vec<_>) = plan
             .into_iter()
-            .partition(|node| DCAwareRoundRobinPolicy::is_local_node(node, &self.local_dc));
+            .partition(|node| DcAwareRoundRobinPolicy::is_local_node(node, &self.local_dc));
 
         let local_nodes_rotation = super::compute_rotation(index, local_nodes.len());
         let rotated_local_nodes = super::slice_rotated_left(&local_nodes, local_nodes_rotation);
@@ -114,7 +114,7 @@ mod tests {
         let cluster = tests::mock_cluster_data_for_round_robin_tests();
 
         let local_dc = "eu".to_string();
-        let policy = DCAwareRoundRobinPolicy::new(local_dc);
+        let policy = DcAwareRoundRobinPolicy::new(local_dc);
 
         let plans = (0..4)
             .map(|_| {
diff --git a/scylla/src/transport/load_balancing/mod.rs b/scylla/src/transport/load_balancing/mod.rs
index 7e9d0921..9f11374f 100644
--- a/scylla/src/transport/load_balancing/mod.rs
+++ b/scylla/src/transport/load_balancing/mod.rs
@@ -7,7 +7,7 @@ mod dc_aware_round_robin;
 mod round_robin;
 mod token_aware;
 
-pub use dc_aware_round_robin::DCAwareRoundRobinPolicy;
+pub use dc_aware_round_robin::DcAwareRoundRobinPolicy;
 pub use round_robin::RoundRobinPolicy;
 pub use token_aware::TokenAwarePolicy;
 
@@ -104,11 +104,11 @@ mod tests {
     #[test]
     fn test_names() {
         let local_dc = "eu".to_string();
-        let policy = TokenAwarePolicy::new(Box::new(DCAwareRoundRobinPolicy::new(local_dc)));
+        let policy = TokenAwarePolicy::new(Box::new(DcAwareRoundRobinPolicy::new(local_dc)));
 
         assert_eq!(
             policy.name(),
-            "TokenAwarePolicy{child_policy: DCAwareRoundRobinPolicy}".to_string()
+            "TokenAwarePolicy{child_policy: DcAwareRoundRobinPolicy}".to_string()
         );
     }
 
diff --git a/scylla/src/transport/load_balancing/token_aware.rs b/scylla/src/transport/load_balancing/token_aware.rs
index 3993b5e2..dda88907 100644
--- a/scylla/src/transport/load_balancing/token_aware.rs
+++ b/scylla/src/transport/load_balancing/token_aware.rs
@@ -166,7 +166,7 @@ mod tests {
         struct Test<'a> {
             statement: Statement<'a>,
             expected_plan: Vec<u16>,
-        };
+        }
 
         let tests = [
             Test {
diff --git a/scylla/src/transport/mod.rs b/scylla/src/transport/mod.rs
index cbaac27f..83bcfa08 100644
--- a/scylla/src/transport/mod.rs
+++ b/scylla/src/transport/mod.rs
@@ -19,7 +19,7 @@ mod session_test;
 #[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Debug)]
 pub enum Compression {
     /// LZ4 compression algorithm.
-    LZ4,
+    Lz4,
     /// Snappy compression algorithm.
     Snappy,
 }
@@ -27,7 +27,7 @@ pub enum Compression {
 impl ToString for Compression {
     fn to_string(&self) -> String {
         match self {
-            Compression::LZ4 => "lz4".to_owned(),
+            Compression::Lz4 => "lz4".to_owned(),
             Compression::Snappy => "snappy".to_owned(),
         }
     }
diff --git a/scylla/src/transport/node.rs b/scylla/src/transport/node.rs
index ffd2dac0..a3e4d328 100644
--- a/scylla/src/transport/node.rs
+++ b/scylla/src/transport/node.rs
@@ -333,11 +333,11 @@ impl NodeWorker {
         let use_keyspace_results: Vec<Result<(), QueryError>> =
             join_all(use_keyspace_futures).await;
 
-        // If there was at least one Ok and the rest were IOErrors we can return Ok
+        // If there was at least one Ok and the rest were IoErrors we can return Ok
         // keyspace name is correct and will be used on broken connection on the next reconnect
 
-        // If there were only IOErrors then return IOError
-        // If there was an error different than IOError return this error - something is wrong
+        // If there were only IoErrors then return IoError
+        // If there was an error different than IoError return this error - something is wrong
 
         let mut was_ok: bool = false;
         let mut io_error: Option<Arc<std::io::Error>> = None;
@@ -346,7 +346,7 @@ impl NodeWorker {
             match result {
                 Ok(()) => was_ok = true,
                 Err(err) => match err {
-                    QueryError::IOError(io_err) => io_error = Some(io_err),
+                    QueryError::IoError(io_err) => io_error = Some(io_err),
                     _ => return Err(err),
                 },
             }
@@ -357,6 +357,6 @@ impl NodeWorker {
         }
 
         // We can unwrap io_error because use_keyspace_futures must be nonempty
-        return Err(QueryError::IOError(io_error.unwrap()));
+        return Err(QueryError::IoError(io_error.unwrap()));
     }
 }
diff --git a/scylla/src/transport/retry_policy.rs b/scylla/src/transport/retry_policy.rs
index fe01652b..4fd6a760 100644
--- a/scylla/src/transport/retry_policy.rs
+++ b/scylla/src/transport/retry_policy.rs
@@ -1,5 +1,5 @@
 use crate::statement::Consistency;
-use crate::transport::errors::{DBError, QueryError, WriteType};
+use crate::transport::errors::{DbError, QueryError, WriteType};
 
 /// Information about a failed query
 pub struct QueryInfo<'a> {
@@ -126,10 +126,10 @@ impl RetrySession for DefaultRetrySession {
         match query_info.error {
             // Basic errors - there are some problems on this node
             // Retry on a different one if possible
-            QueryError::IOError(_)
-            | QueryError::DBError(DBError::Overloaded, _)
-            | QueryError::DBError(DBError::ServerError, _)
-            | QueryError::DBError(DBError::TruncateError, _) => {
+            QueryError::IoError(_)
+            | QueryError::DbError(DbError::Overloaded, _)
+            | QueryError::DbError(DbError::ServerError, _)
+            | QueryError::DbError(DbError::TruncateError, _) => {
                 if query_info.is_idempotent {
                     RetryDecision::RetryNextNode
                 } else {
@@ -141,7 +141,7 @@ impl RetrySession for DefaultRetrySession {
             // Maybe this node has network problems - try a different one.
             // Perform at most one retry - it's unlikely that two nodes
             // have network problems at the same time
-            QueryError::DBError(DBError::Unavailable { .. }, _) => {
+            QueryError::DbError(DbError::Unavailable { .. }, _) => {
                 if !self.was_unavailable_retry {
                     self.was_unavailable_retry = true;
                     RetryDecision::RetryNextNode
@@ -155,8 +155,8 @@ impl RetrySession for DefaultRetrySession {
             // This happens when the coordinator picked replicas that were overloaded/dying.
             // Retried request should have some useful response because the node will detect
             // that these replicas are dead.
-            QueryError::DBError(
-                DBError::ReadTimeout {
+            QueryError::DbError(
+                DbError::ReadTimeout {
                     received,
                     required,
                     data_present,
@@ -175,7 +175,7 @@ impl RetrySession for DefaultRetrySession {
             // Retry at most once and only for BatchLog write.
             // Coordinator probably didn't detect the nodes as dead.
             // By the time we retry they should be detected as dead.
-            QueryError::DBError(DBError::WriteTimeout { write_type, .. }, _) => {
+            QueryError::DbError(DbError::WriteTimeout { write_type, .. }, _) => {
                 if !self.was_write_timeout_retry
                     && query_info.is_idempotent
                     && *write_type == WriteType::BatchLog
@@ -187,7 +187,7 @@ impl RetrySession for DefaultRetrySession {
                 }
             }
             // The node is still bootstrapping it can't execute the query, we should try another one
-            QueryError::DBError(DBError::IsBootstrapping, _) => RetryDecision::RetryNextNode,
+            QueryError::DbError(DbError::IsBootstrapping, _) => RetryDecision::RetryNextNode,
             // In all other cases propagate the error to the user
             _ => RetryDecision::DontRetry,
         }
@@ -202,7 +202,7 @@ impl RetrySession for DefaultRetrySession {
 mod tests {
     use super::{DefaultRetryPolicy, QueryInfo, RetryDecision, RetryPolicy};
     use crate::statement::Consistency;
-    use crate::transport::errors::{BadQuery, DBError, QueryError, WriteType};
+    use crate::transport::errors::{BadQuery, DbError, QueryError, WriteType};
     use std::io::ErrorKind;
     use std::sync::Arc;
 
@@ -232,41 +232,41 @@ mod tests {
     #[test]
     fn default_never_retries() {
         let never_retried_dberrors = vec![
-            DBError::SyntaxError,
-            DBError::Invalid,
-            DBError::AlreadyExists {
+            DbError::SyntaxError,
+            DbError::Invalid,
+            DbError::AlreadyExists {
                 keyspace: String::new(),
                 table: String::new(),
             },
-            DBError::FunctionFailure {
+            DbError::FunctionFailure {
                 keyspace: String::new(),
                 function: String::new(),
                 arg_types: vec![],
             },
-            DBError::AuthenticationError,
-            DBError::Unauthorized,
-            DBError::ConfigError,
-            DBError::ReadFailure {
+            DbError::AuthenticationError,
+            DbError::Unauthorized,
+            DbError::ConfigError,
+            DbError::ReadFailure {
                 consistency: Consistency::Two,
                 received: 2,
                 required: 1,
                 numfailures: 1,
                 data_present: false,
             },
-            DBError::WriteFailure {
+            DbError::WriteFailure {
                 consistency: Consistency::Two,
                 received: 1,
                 required: 2,
                 numfailures: 1,
                 write_type: WriteType::BatchLog,
             },
-            DBError::Unprepared,
-            DBError::ProtocolError,
-            DBError::Other(0x124816),
+            DbError::Unprepared,
+            DbError::ProtocolError,
+            DbError::Other(0x124816),
         ];
 
         for dberror in never_retried_dberrors {
-            default_policy_assert_never_retries(QueryError::DBError(dberror, String::new()));
+            default_policy_assert_never_retries(QueryError::DbError(dberror, String::new()));
         }
 
         default_policy_assert_never_retries(QueryError::BadQuery(BadQuery::ValueLenMismatch(1, 2)));
@@ -291,10 +291,10 @@ mod tests {
     #[test]
     fn default_idempotent_next_retries() {
         let idempotent_next_errors = vec![
-            QueryError::DBError(DBError::Overloaded, String::new()),
-            QueryError::DBError(DBError::TruncateError, String::new()),
-            QueryError::DBError(DBError::ServerError, String::new()),
-            QueryError::IOError(Arc::new(std::io::Error::new(ErrorKind::Other, "test"))),
+            QueryError::DbError(DbError::Overloaded, String::new()),
+            QueryError::DbError(DbError::TruncateError, String::new()),
+            QueryError::DbError(DbError::ServerError, String::new()),
+            QueryError::IoError(Arc::new(std::io::Error::new(ErrorKind::Other, "test"))),
         ];
 
         for error in idempotent_next_errors {
@@ -305,7 +305,7 @@ mod tests {
     // Always retry on next node if current one is bootstrapping
     #[test]
     fn default_bootstrapping() {
-        let error = QueryError::DBError(DBError::IsBootstrapping, String::new());
+        let error = QueryError::DbError(DbError::IsBootstrapping, String::new());
 
         let mut policy = DefaultRetryPolicy::new().new_session();
         assert_eq!(
@@ -323,8 +323,8 @@ mod tests {
     // On Unavailable error we retry one time no matter the idempotence
     #[test]
     fn default_unavailable() {
-        let error = QueryError::DBError(
-            DBError::Unavailable {
+        let error = QueryError::DbError(
+            DbError::Unavailable {
                 consistency: Consistency::Two,
                 required: 2,
                 alive: 1,
@@ -357,8 +357,8 @@ mod tests {
     #[test]
     fn default_read_timeout() {
         // Enough responses and data_present == true
-        let enough_responses_with_data = QueryError::DBError(
-            DBError::ReadTimeout {
+        let enough_responses_with_data = QueryError::DbError(
+            DbError::ReadTimeout {
                 consistency: Consistency::Two,
                 received: 2,
                 required: 2,
@@ -390,8 +390,8 @@ mod tests {
         );
 
         // Enough responses but data_present == false
-        let enough_responses_no_data = QueryError::DBError(
-            DBError::ReadTimeout {
+        let enough_responses_no_data = QueryError::DbError(
+            DbError::ReadTimeout {
                 consistency: Consistency::Two,
                 received: 2,
                 required: 2,
@@ -415,8 +415,8 @@ mod tests {
         );
 
         // Not enough responses, data_present == true
-        let not_enough_responses_with_data = QueryError::DBError(
-            DBError::ReadTimeout {
+        let not_enough_responses_with_data = QueryError::DbError(
+            DbError::ReadTimeout {
                 consistency: Consistency::Two,
                 received: 1,
                 required: 2,
@@ -444,8 +444,8 @@ mod tests {
     #[test]
     fn default_write_timeout() {
         // WriteType == BatchLog
-        let good_write_type = QueryError::DBError(
-            DBError::WriteTimeout {
+        let good_write_type = QueryError::DbError(
+            DbError::WriteTimeout {
                 consistency: Consistency::Two,
                 received: 1,
                 required: 2,
@@ -473,8 +473,8 @@ mod tests {
         );
 
         // WriteType != BatchLog
-        let bad_write_type = QueryError::DBError(
-            DBError::WriteTimeout {
+        let bad_write_type = QueryError::DbError(
+            DbError::WriteTimeout {
                 consistency: Consistency::Two,
                 received: 4,
                 required: 2,
diff --git a/scylla/src/transport/session_builder.rs b/scylla/src/transport/session_builder.rs
index 0cce157d..a573abc7 100644
--- a/scylla/src/transport/session_builder.rs
+++ b/scylla/src/transport/session_builder.rs
@@ -331,8 +331,8 @@ mod tests {
         let mut builder = SessionBuilder::new();
         assert_eq!(builder.config.compression, None);
 
-        builder = builder.compression(Some(Compression::LZ4));
-        assert_eq!(builder.config.compression, Some(Compression::LZ4));
+        builder = builder.compression(Some(Compression::Lz4));
+        assert_eq!(builder.config.compression, Some(Compression::Lz4));
 
         builder = builder.compression(Some(Compression::Snappy));
         assert_eq!(builder.config.compression, Some(Compression::Snappy));


Test patch:
diff --git a/scylla/src/frame/cql_types_test.rs b/scylla/src/frame/cql_types_test.rs
index 7e8f301f..28382857 100644
--- a/scylla/src/frame/cql_types_test.rs
+++ b/scylla/src/frame/cql_types_test.rs
@@ -1,5 +1,5 @@
-use crate::cql_to_rust::FromCQLVal;
-use crate::frame::response::result::CQLValue;
+use crate::cql_to_rust::FromCqlVal;
+use crate::frame::response::result::CqlValue;
 use crate::frame::value::Counter;
 use crate::frame::value::Value;
 use crate::frame::value::{Date, Time, Timestamp};
@@ -62,7 +62,7 @@ async fn init_test(table_name: &str, type_name: &str) -> Session {
 // Expected values and bound values are computed using T::from_str
 async fn run_tests<T>(tests: &[&str], type_name: &str)
 where
-    T: Value + FromCQLVal<CQLValue> + FromStr + Debug + Clone + PartialEq,
+    T: Value + FromCqlVal<CqlValue> + FromStr + Debug + Clone + PartialEq,
 {
     let session: Session = init_test(type_name, type_name).await;
 
@@ -316,7 +316,7 @@ async fn test_date() {
             .columns[0]
             .as_ref()
             .map(|cql_val| match cql_val {
-                CQLValue::Date(days) => Date(*days),
+                CqlValue::Date(days) => Date(*days),
                 _ => panic!(),
             })
             .unwrap();
diff --git a/scylla/src/transport/session_test.rs b/scylla/src/transport/session_test.rs
index 4ce83f8e..1c4c8741 100644
--- a/scylla/src/transport/session_test.rs
+++ b/scylla/src/transport/session_test.rs
@@ -1,6 +1,6 @@
 use crate::frame::value::ValueList;
 use crate::routing::hash3_x64_128;
-use crate::transport::errors::{BadKeyspaceName, BadQuery, DBError, QueryError};
+use crate::transport::errors::{BadKeyspaceName, BadQuery, DbError, QueryError};
 use crate::{IntoTypedRows, Session, SessionBuilder};
 
 #[tokio::test]
@@ -552,21 +552,21 @@ async fn test_db_errors() {
     // SyntaxError on bad query
     assert!(matches!(
         session.query("gibberish", &[]).await,
-        Err(QueryError::DBError(DBError::SyntaxError, _))
+        Err(QueryError::DbError(DbError::SyntaxError, _))
     ));
 
     // AlreadyExists when creating a keyspace for the second time
     session.query("CREATE KEYSPACE IF NOT EXISTS db_errors_ks WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}", &[]).await.unwrap();
 
     let create_keyspace_res = session.query("CREATE KEYSPACE db_errors_ks WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}", &[]).await;
-    let keyspace_exists_error: DBError = match create_keyspace_res {
-        Err(QueryError::DBError(e, _)) => e,
+    let keyspace_exists_error: DbError = match create_keyspace_res {
+        Err(QueryError::DbError(e, _)) => e,
         _ => panic!("Second CREATE KEYSPACE didn't return an error!"),
     };
 
     assert_eq!(
         keyspace_exists_error,
-        DBError::AlreadyExists {
+        DbError::AlreadyExists {
             keyspace: "db_errors_ks".to_string(),
             table: "".to_string()
         }
@@ -584,14 +584,14 @@ async fn test_db_errors() {
     let create_table_res = session
         .query("CREATE TABLE db_errors_ks.tab (a text primary key)", &[])
         .await;
-    let create_tab_error: DBError = match create_table_res {
-        Err(QueryError::DBError(e, _)) => e,
+    let create_tab_error: DbError = match create_table_res {
+        Err(QueryError::DbError(e, _)) => e,
         _ => panic!("Second CREATE TABLE didn't return an error!"),
     };
 
     assert_eq!(
         create_tab_error,
-        DBError::AlreadyExists {
+        DbError::AlreadyExists {
             keyspace: "db_errors_ks".to_string(),
             table: "tab".to_string()
         }