Repository: AlexPikalov/cdrs (language: rust)

Issue:
rustfmt configured but not used
I've tried running `cargo fmt` in the repository and about half of the files were modified.  
The biggest issue is with the number of spaces for indentation. Some files use 4 spaces and others use 2 spaces, the `rustfmt.toml` configures the project to use 2 spaces.


Discussion / hints:
@ZakCodes Thanks for the issue.
It's true. It was disabled in times when `cargo fmt` required nightly version of Rust.
Now we can enable it.


Fix patch:
diff --git a/.travis.yml b/.travis.yml
index fbcd3b2..f8cee80 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
 dist: trusty
 language: rust
-# cache: cargo
 rust:
   - stable
   - beta
@@ -13,11 +12,13 @@ services:
 sudo: required
 
 install:
-  # - (cargo install rustfmt --force  || true)
   - PATH=$PATH:/home/travis/.cargo/bin
 
+before_script:
+  - rustup component add rustfmt
+
 script:
-  # - cargo fmt -- --write-mode=diff
+  - cargo fmt -- --check
   - cargo build --verbose
   - cargo test --verbose --no-fail-fast
   - cargo test --verbose --no-fail-fast --features e2e-tests
diff --git a/examples/crud_operations.rs b/examples/crud_operations.rs
index 6b187db..4f34b87 100644
--- a/examples/crud_operations.rs
+++ b/examples/crud_operations.rs
@@ -20,114 +20,114 @@ use cdrs::types::prelude::*;
 type CurrentSession = Session<RoundRobin<TcpConnectionPool<StaticPasswordAuthenticator>>>;
 
 fn main() {
-  let user = "user";
-  let password = "password";
-  let auth = StaticPasswordAuthenticator::new(&user, &password);
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", auth).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let no_compression: CurrentSession =
-    new_session(&cluster_config, RoundRobin::new()).expect("session should be created");
-
-  create_keyspace(&no_compression);
-  create_udt(&no_compression);
-  create_table(&no_compression);
-  insert_struct(&no_compression);
-  select_struct(&no_compression);
-  update_struct(&no_compression);
-  delete_struct(&no_compression);
+    let user = "user";
+    let password = "password";
+    let auth = StaticPasswordAuthenticator::new(&user, &password);
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", auth).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let no_compression: CurrentSession =
+        new_session(&cluster_config, RoundRobin::new()).expect("session should be created");
+
+    create_keyspace(&no_compression);
+    create_udt(&no_compression);
+    create_table(&no_compression);
+    insert_struct(&no_compression);
+    select_struct(&no_compression);
+    update_struct(&no_compression);
+    delete_struct(&no_compression);
 }
 
 #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
 struct RowStruct {
-  key: i32,
-  user: User,
-  map: HashMap<String, User>,
-  list: Vec<User>,
+    key: i32,
+    user: User,
+    map: HashMap<String, User>,
+    list: Vec<User>,
 }
 
 impl RowStruct {
-  fn into_query_values(self) -> QueryValues {
-    query_values!("key" => self.key, "user" => self.user, "map" => self.map, "list" => self.list)
-  }
+    fn into_query_values(self) -> QueryValues {
+        query_values!("key" => self.key, "user" => self.user, "map" => self.map, "list" => self.list)
+    }
 }
 
 #[derive(Debug, Clone, PartialEq, IntoCDRSValue, TryFromUDT)]
 struct User {
-  username: String,
+    username: String,
 }
 
 fn create_keyspace(session: &CurrentSession) {
-  let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
-                                 'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
-  session.query(create_ks).expect("Keyspace creation error");
+    let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
+                                   'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
+    session.query(create_ks).expect("Keyspace creation error");
 }
 
 fn create_udt(session: &CurrentSession) {
-  let create_type_cql = "CREATE TYPE IF NOT EXISTS test_ks.user (username text)";
-  session
-    .query(create_type_cql)
-    .expect("Keyspace creation error");
+    let create_type_cql = "CREATE TYPE IF NOT EXISTS test_ks.user (username text)";
+    session
+        .query(create_type_cql)
+        .expect("Keyspace creation error");
 }
 
 fn create_table(session: &CurrentSession) {
-  let create_table_cql =
+    let create_table_cql =
     "CREATE TABLE IF NOT EXISTS test_ks.my_test_table (key int PRIMARY KEY, \
      user frozen<test_ks.user>, map map<text, frozen<test_ks.user>>, list list<frozen<test_ks.user>>);";
-  session
-    .query(create_table_cql)
-    .expect("Table creation error");
+    session
+        .query(create_table_cql)
+        .expect("Table creation error");
 }
 
 fn insert_struct(session: &CurrentSession) {
-  let row = RowStruct {
-    key: 3i32,
-    user: User {
-      username: "John".to_string(),
-    },
-    map: hashmap! { "John".to_string() => User { username: "John".to_string() } },
-    list: vec![User {
-      username: "John".to_string(),
-    }],
-  };
-
-  let insert_struct_cql = "INSERT INTO test_ks.my_test_table \
-                           (key, user, map, list) VALUES (?, ?, ?, ?)";
-  session
-    .query_with_values(insert_struct_cql, row.into_query_values())
-    .expect("insert");
+    let row = RowStruct {
+        key: 3i32,
+        user: User {
+            username: "John".to_string(),
+        },
+        map: hashmap! { "John".to_string() => User { username: "John".to_string() } },
+        list: vec![User {
+            username: "John".to_string(),
+        }],
+    };
+
+    let insert_struct_cql = "INSERT INTO test_ks.my_test_table \
+                             (key, user, map, list) VALUES (?, ?, ?, ?)";
+    session
+        .query_with_values(insert_struct_cql, row.into_query_values())
+        .expect("insert");
 }
 
 fn select_struct(session: &CurrentSession) {
-  let select_struct_cql = "SELECT * FROM test_ks.my_test_table";
-  let rows = session
-    .query(select_struct_cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  for row in rows {
-    let my_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
-    println!("struct got: {:?}", my_row);
-  }
+    let select_struct_cql = "SELECT * FROM test_ks.my_test_table";
+    let rows = session
+        .query(select_struct_cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    for row in rows {
+        let my_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
+        println!("struct got: {:?}", my_row);
+    }
 }
 
 fn update_struct(session: &CurrentSession) {
-  let update_struct_cql = "UPDATE test_ks.my_test_table SET user = ? WHERE key = ?";
-  let upd_user = User {
-    username: "Marry".to_string(),
-  };
-  let user_key = 1i32;
-  session
-    .query_with_values(update_struct_cql, query_values!(upd_user, user_key))
-    .expect("update");
+    let update_struct_cql = "UPDATE test_ks.my_test_table SET user = ? WHERE key = ?";
+    let upd_user = User {
+        username: "Marry".to_string(),
+    };
+    let user_key = 1i32;
+    session
+        .query_with_values(update_struct_cql, query_values!(upd_user, user_key))
+        .expect("update");
 }
 
 fn delete_struct(session: &CurrentSession) {
-  let delete_struct_cql = "DELETE FROM test_ks.my_test_table WHERE key = ?";
-  let user_key = 1i32;
-  session
-    .query_with_values(delete_struct_cql, query_values!(user_key))
-    .expect("delete");
+    let delete_struct_cql = "DELETE FROM test_ks.my_test_table WHERE key = ?";
+    let user_key = 1i32;
+    session
+        .query_with_values(delete_struct_cql, query_values!(user_key))
+        .expect("delete");
 }
diff --git a/examples/multiple_thread.rs b/examples/multiple_thread.rs
index ba9d703..53a0499 100644
--- a/examples/multiple_thread.rs
+++ b/examples/multiple_thread.rs
@@ -19,77 +19,78 @@ use cdrs::types::prelude::*;
 type CurrentSession = Session<RoundRobinSync<TcpConnectionPool<NoneAuthenticator>>>;
 
 fn main() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobinSync::new();
-  let no_compression: Arc<CurrentSession> =
-    Arc::new(new_session(&cluster_config, lb).expect("session should be created"));
-
-  create_keyspace(&no_compression.clone());
-  create_table(&no_compression.clone());
-
-  for i in 0..20 {
-    let thread_session = no_compression.clone();
-    thread::spawn(move || {
-      insert_struct(&thread_session, i);
-    }).join()
-      .expect("thread error");
-  }
-
-  select_struct(&no_compression);
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobinSync::new();
+    let no_compression: Arc<CurrentSession> =
+        Arc::new(new_session(&cluster_config, lb).expect("session should be created"));
+
+    create_keyspace(&no_compression.clone());
+    create_table(&no_compression.clone());
+
+    for i in 0..20 {
+        let thread_session = no_compression.clone();
+        thread::spawn(move || {
+            insert_struct(&thread_session, i);
+        })
+        .join()
+        .expect("thread error");
+    }
+
+    select_struct(&no_compression);
 }
 
 #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
 struct RowStruct {
-  key: i32,
+    key: i32,
 }
 
 impl RowStruct {
-  fn into_query_values(self) -> QueryValues {
-    query_values!("key" => self.key)
-  }
+    fn into_query_values(self) -> QueryValues {
+        query_values!("key" => self.key)
+    }
 }
 
 #[derive(Debug, Clone, PartialEq, IntoCDRSValue, TryFromUDT)]
 struct User {
-  username: String,
+    username: String,
 }
 
 fn create_keyspace(session: &CurrentSession) {
-  let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
-                                 'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
-  session.query(create_ks).expect("Keyspace creation error");
+    let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
+                                   'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
+    session.query(create_ks).expect("Keyspace creation error");
 }
 
 fn create_table(session: &CurrentSession) {
-  let create_table_cql =
-    "CREATE TABLE IF NOT EXISTS test_ks.multi_thread_table (key int PRIMARY KEY);";
-  session
-    .query(create_table_cql)
-    .expect("Table creation error");
+    let create_table_cql =
+        "CREATE TABLE IF NOT EXISTS test_ks.multi_thread_table (key int PRIMARY KEY);";
+    session
+        .query(create_table_cql)
+        .expect("Table creation error");
 }
 
 fn insert_struct(session: &CurrentSession, key: i32) {
-  let row = RowStruct { key };
+    let row = RowStruct { key };
 
-  let insert_struct_cql = "INSERT INTO test_ks.multi_thread_table (key) VALUES (?)";
-  session
-    .query_with_values(insert_struct_cql, row.into_query_values())
-    .expect("insert");
+    let insert_struct_cql = "INSERT INTO test_ks.multi_thread_table (key) VALUES (?)";
+    session
+        .query_with_values(insert_struct_cql, row.into_query_values())
+        .expect("insert");
 }
 
 fn select_struct(session: &CurrentSession) {
-  let select_struct_cql = "SELECT * FROM test_ks.multi_thread_table";
-  let rows = session
-    .query(select_struct_cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  for row in rows {
-    let my_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
-    println!("struct got: {:?}", my_row);
-  }
+    let select_struct_cql = "SELECT * FROM test_ks.multi_thread_table";
+    let rows = session
+        .query(select_struct_cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    for row in rows {
+        let my_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
+        println!("struct got: {:?}", my_row);
+    }
 }
diff --git a/examples/paged_query.rs b/examples/paged_query.rs
index 2a4dd21..141d2b4 100644
--- a/examples/paged_query.rs
+++ b/examples/paged_query.rs
@@ -17,91 +17,93 @@ type CurrentSession = Session<RoundRobin<TcpConnectionPool<NoneAuthenticator>>>;
 
 #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
 struct RowStruct {
-  key: i32,
+    key: i32,
 }
 
 impl RowStruct {
-  fn into_query_values(self) -> QueryValues {
-    query_values!("key" => self.key)
-  }
+    fn into_query_values(self) -> QueryValues {
+        query_values!("key" => self.key)
+    }
 }
 
 fn main() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let no_compression = new_session(&cluster_config, lb).expect("session should be created");
-
-  create_keyspace(&no_compression);
-  create_table(&no_compression);
-  fill_table(&no_compression);
-  println!("Internal pager state\n");
-  paged_selection_query(&no_compression);
-  println!("\n\nExternal pager state for stateless executions\n");
-  paged_selection_query_with_state(&no_compression, PagerState::new());
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let no_compression = new_session(&cluster_config, lb).expect("session should be created");
+
+    create_keyspace(&no_compression);
+    create_table(&no_compression);
+    fill_table(&no_compression);
+    println!("Internal pager state\n");
+    paged_selection_query(&no_compression);
+    println!("\n\nExternal pager state for stateless executions\n");
+    paged_selection_query_with_state(&no_compression, PagerState::new());
 }
 
 fn create_keyspace(session: &CurrentSession) {
-  let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
-                                 'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
-  session.query(create_ks).expect("Keyspace creation error");
+    let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
+                                   'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
+    session.query(create_ks).expect("Keyspace creation error");
 }
 
 fn create_table(session: &CurrentSession) {
-  let create_table_cql =
-    "CREATE TABLE IF NOT EXISTS test_ks.my_test_table (key int PRIMARY KEY, \
-     user test_ks.user, map map<text, frozen<test_ks.user>>, list list<frozen<test_ks.user>>);";
-  session.query(create_table_cql)
-         .expect("Table creation error");
+    let create_table_cql =
+        "CREATE TABLE IF NOT EXISTS test_ks.my_test_table (key int PRIMARY KEY, \
+         user test_ks.user, map map<text, frozen<test_ks.user>>, list list<frozen<test_ks.user>>);";
+    session
+        .query(create_table_cql)
+        .expect("Table creation error");
 }
 
 fn fill_table(session: &CurrentSession) {
-  let insert_struct_cql = "INSERT INTO test_ks.my_test_table (key) VALUES (?)";
+    let insert_struct_cql = "INSERT INTO test_ks.my_test_table (key) VALUES (?)";
 
-  for k in 100..110 {
-    let row = RowStruct { key: k as i32 };
+    for k in 100..110 {
+        let row = RowStruct { key: k as i32 };
 
-    session.query_with_values(insert_struct_cql, row.into_query_values())
-           .expect("insert");
-  }
+        session
+            .query_with_values(insert_struct_cql, row.into_query_values())
+            .expect("insert");
+    }
 }
 
 fn paged_selection_query(session: &CurrentSession) {
-  let q = "SELECT * FROM test_ks.my_test_table;";
-  let mut pager = session.paged(2);
-  let mut query_pager = pager.query(q);
-
-  loop {
-    let rows = query_pager.next().expect("pager next");
-    for row in rows {
-      let my_row = RowStruct::try_from_row(row).expect("decode row");
-      println!("row - {:?}", my_row);
-    }
-
-    if !query_pager.has_more() {
-      break;
+    let q = "SELECT * FROM test_ks.my_test_table;";
+    let mut pager = session.paged(2);
+    let mut query_pager = pager.query(q);
+
+    loop {
+        let rows = query_pager.next().expect("pager next");
+        for row in rows {
+            let my_row = RowStruct::try_from_row(row).expect("decode row");
+            println!("row - {:?}", my_row);
+        }
+
+        if !query_pager.has_more() {
+            break;
+        }
     }
-  }
 }
 
 fn paged_selection_query_with_state(session: &CurrentSession, state: PagerState) {
-  let mut st = state;
+    let mut st = state;
 
-  loop {
-    let q = "SELECT * FROM test_ks.my_test_table;";
-    let mut pager = session.paged(2);
-    let mut query_pager = pager.query_with_pager_state(q, st);
+    loop {
+        let q = "SELECT * FROM test_ks.my_test_table;";
+        let mut pager = session.paged(2);
+        let mut query_pager = pager.query_with_pager_state(q, st);
 
-    let rows = query_pager.next().expect("pager next");
-    for row in rows {
-      let my_row = RowStruct::try_from_row(row).expect("decode row");
-      println!("row - {:?}", my_row);
-    }
+        let rows = query_pager.next().expect("pager next");
+        for row in rows {
+            let my_row = RowStruct::try_from_row(row).expect("decode row");
+            println!("row - {:?}", my_row);
+        }
 
-    if !query_pager.has_more() {
-      break;
-    }
+        if !query_pager.has_more() {
+            break;
+        }
 
-    st = query_pager.pager_state();
-  }
+        st = query_pager.pager_state();
+    }
 }
diff --git a/examples/prepare_batch_execute.rs b/examples/prepare_batch_execute.rs
index a6261e2..bae7542 100644
--- a/examples/prepare_batch_execute.rs
+++ b/examples/prepare_batch_execute.rs
@@ -17,69 +17,70 @@ type CurrentSession = Session<RoundRobin<TcpConnectionPool<NoneAuthenticator>>>;
 
 #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
 struct RowStruct {
-  key: i32,
+    key: i32,
 }
 
 impl RowStruct {
-  fn into_query_values(self) -> QueryValues {
-    /// **IMPORTANT NOTE:** query values should be WITHOUT NAMES
-    /// https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L413
-    query_values!(self.key)
-  }
+    fn into_query_values(self) -> QueryValues {
+        /// **IMPORTANT NOTE:** query values should be WITHOUT NAMES
+        /// https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L413
+        query_values!(self.key)
+    }
 }
 
 fn main() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let no_compression = new_session(&cluster_config, lb).expect("session should be created");
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let no_compression = new_session(&cluster_config, lb).expect("session should be created");
 
-  create_keyspace(&no_compression);
-  create_table(&no_compression);
+    create_keyspace(&no_compression);
+    create_table(&no_compression);
 
-  let insert_struct_cql = "INSERT INTO test_ks.my_test_table (key) VALUES (?)";
-  let prepared_query = no_compression
-    .prepare(insert_struct_cql)
-    .expect("Prepare query error");
+    let insert_struct_cql = "INSERT INTO test_ks.my_test_table (key) VALUES (?)";
+    let prepared_query = no_compression
+        .prepare(insert_struct_cql)
+        .expect("Prepare query error");
 
-  for k in 100..110 {
-    let row = RowStruct { key: k as i32 };
+    for k in 100..110 {
+        let row = RowStruct { key: k as i32 };
 
-    insert_row(&no_compression, row, &prepared_query);
-  }
+        insert_row(&no_compression, row, &prepared_query);
+    }
 
-  batch_few_queries(&no_compression, &insert_struct_cql);
+    batch_few_queries(&no_compression, &insert_struct_cql);
 }
 
 fn create_keyspace(session: &CurrentSession) {
-  let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
-                                 'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
-  session.query(create_ks).expect("Keyspace creation error");
+    let create_ks: &'static str = "CREATE KEYSPACE IF NOT EXISTS test_ks WITH REPLICATION = { \
+                                   'class' : 'SimpleStrategy', 'replication_factor' : 1 };";
+    session.query(create_ks).expect("Keyspace creation error");
 }
 
 fn create_table(session: &CurrentSession) {
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS test_ks.my_test_table (key int PRIMARY KEY);";
-  session
-    .query(create_table_cql)
-    .expect("Table creation error");
+    let create_table_cql =
+        "CREATE TABLE IF NOT EXISTS test_ks.my_test_table (key int PRIMARY KEY);";
+    session
+        .query(create_table_cql)
+        .expect("Table creation error");
 }
 
 fn insert_row(session: &CurrentSession, row: RowStruct, prepared_query: &PreparedQuery) {
-  session
-    .exec_with_values(prepared_query, row.into_query_values())
-    .expect("exec_with_values error");
+    session
+        .exec_with_values(prepared_query, row.into_query_values())
+        .expect("exec_with_values error");
 }
 
 fn batch_few_queries(session: &CurrentSession, query: &str) {
-  let prepared_query = session.prepare(query).expect("Prepare query error");
-  let row_1 = RowStruct { key: 1001 as i32 };
-  let row_2 = RowStruct { key: 2001 as i32 };
+    let prepared_query = session.prepare(query).expect("Prepare query error");
+    let row_1 = RowStruct { key: 1001 as i32 };
+    let row_2 = RowStruct { key: 2001 as i32 };
 
-  let batch = BatchQueryBuilder::new()
-    .add_query_prepared(prepared_query, row_1.into_query_values())
-    .add_query(query, row_2.into_query_values())
-    .finalize()
-    .expect("batch builder");
+    let batch = BatchQueryBuilder::new()
+        .add_query_prepared(prepared_query, row_1.into_query_values())
+        .add_query(query, row_2.into_query_values())
+        .finalize()
+        .expect("batch builder");
 
-  session.batch_with_params(batch).expect("batch query error");
+    session.batch_with_params(batch).expect("batch query error");
 }
diff --git a/examples/server_events.rs b/examples/server_events.rs
index 0d2c11a..9b7778a 100644
--- a/examples/server_events.rs
+++ b/examples/server_events.rs
@@ -13,39 +13,37 @@ use cdrs::load_balancing::RoundRobin;
 const _ADDR: &'static str = "127.0.0.1:9042";
 
 fn main() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let no_compression = new_session(&cluster_config, lb).expect("session should be created");
-
-  let (listener, stream) = no_compression
-    .listen(
-      "127.0.0.1:9042",
-      NoneAuthenticator {},
-      vec![SimpleServerEvent::SchemaChange],
-    )
-    .expect("listen error");
-
-  thread::spawn(move || listener.start(&Compression::None).unwrap());
-
-  let new_tables = stream
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let no_compression = new_session(&cluster_config, lb).expect("session should be created");
+
+    let (listener, stream) = no_compression
+        .listen(
+            "127.0.0.1:9042",
+            NoneAuthenticator {},
+            vec![SimpleServerEvent::SchemaChange],
+        )
+        .expect("listen error");
+
+    thread::spawn(move || listener.start(&Compression::None).unwrap());
+
+    let new_tables = stream
         // inspects all events in a stream
         .inspect(|event| println!("inspect event {:?}", event))
         // filter by event's type: schema changes
         .filter(|event| event == &SimpleServerEvent::SchemaChange)
         // filter by event's specific information: new table was added
-        .filter(|event| {
-            match event {
-                &ServerEvent::SchemaChange(ref event) => {
-                    event.change_type == ChangeType::Created && event.target == Target::Table
-                },
-                _ => false
+        .filter(|event| match event {
+            &ServerEvent::SchemaChange(ref event) => {
+                event.change_type == ChangeType::Created && event.target == Target::Table
             }
+            _ => false,
         });
 
-  println!("Start listen for server events");
+    println!("Start listen for server events");
 
-  for change in new_tables {
-    println!("server event {:?}", change);
-  }
+    for change in new_tables {
+        println!("server event {:?}", change);
+    }
 }
diff --git a/rustfmt.toml b/rustfmt.toml
deleted file mode 100644
index c77c543..0000000
--- a/rustfmt.toml
+++ /dev/null
@@ -1,5 +0,0 @@
-indent_style = "Block"
-combine_control_expr = false
-tab_spaces = 2
-brace_style = "SameLineWhere" 
-empty_item_single_line = true
diff --git a/src/authenticators.rs b/src/authenticators.rs
index bae0074..4668f67 100644
--- a/src/authenticators.rs
+++ b/src/authenticators.rs
@@ -1,160 +1,159 @@
 use crate::types::CBytes;
 
 pub trait Authenticator: Clone + Send + Sync {
-  fn get_auth_token(&self) -> CBytes;
-  fn get_cassandra_name(&self) -> Option<&str>;
+    fn get_auth_token(&self) -> CBytes;
+    fn get_cassandra_name(&self) -> Option<&str>;
 }
 
 #[derive(Debug, Clone)]
 #[deprecated(
-  since = "2.1.0",
-  note = "`PasswordAuthenticator` is deprecated in favour of `StaticPasswordAuthenticator` because the second one doesn't require static lifetime for credentials thus it's easier to use."
+    since = "2.1.0",
+    note = "`PasswordAuthenticator` is deprecated in favour of `StaticPasswordAuthenticator` because the second one doesn't require static lifetime for credentials thus it's easier to use."
 )]
 pub struct PasswordAuthenticator<'a> {
-  username: &'a str,
-  password: &'a str,
+    username: &'a str,
+    password: &'a str,
 }
 
 impl<'a> PasswordAuthenticator<'a> {
-  pub fn new<'b>(username: &'b str, password: &'b str) -> PasswordAuthenticator<'b> {
-    PasswordAuthenticator {
-      username: username,
-      password: password,
+    pub fn new<'b>(username: &'b str, password: &'b str) -> PasswordAuthenticator<'b> {
+        PasswordAuthenticator {
+            username: username,
+            password: password,
+        }
     }
-  }
 }
 
 impl<'a> Authenticator for PasswordAuthenticator<'a> {
-  fn get_auth_token(&self) -> CBytes {
-    let mut token = vec![0];
-    token.extend_from_slice(self.username.as_bytes());
-    token.push(0);
-    token.extend_from_slice(self.password.as_bytes());
-
-    CBytes::new(token)
-  }
-
-  fn get_cassandra_name(&self) -> Option<&str> {
-    Some("org.apache.cassandra.auth.PasswordAuthenticator")
-  }
+    fn get_auth_token(&self) -> CBytes {
+        let mut token = vec![0];
+        token.extend_from_slice(self.username.as_bytes());
+        token.push(0);
+        token.extend_from_slice(self.password.as_bytes());
+
+        CBytes::new(token)
+    }
+
+    fn get_cassandra_name(&self) -> Option<&str> {
+        Some("org.apache.cassandra.auth.PasswordAuthenticator")
+    }
 }
 
 #[derive(Debug, Clone)]
 pub struct StaticPasswordAuthenticator {
-  username: String,
-  password: String,
+    username: String,
+    password: String,
 }
 
 impl StaticPasswordAuthenticator {
-  pub fn new<S: ToString>(username: S, password: S) -> StaticPasswordAuthenticator {
-    StaticPasswordAuthenticator {
-      username: username.to_string(),
-      password: password.to_string(),
+    pub fn new<S: ToString>(username: S, password: S) -> StaticPasswordAuthenticator {
+        StaticPasswordAuthenticator {
+            username: username.to_string(),
+            password: password.to_string(),
+        }
     }
-  }
 }
 
 impl Authenticator for StaticPasswordAuthenticator {
-  fn get_auth_token(&self) -> CBytes {
-    let mut token = vec![0];
-    token.extend_from_slice(self.username.as_bytes());
-    token.push(0);
-    token.extend_from_slice(self.password.as_bytes());
-
-    CBytes::new(token)
-  }
-
-  fn get_cassandra_name(&self) -> Option<&str> {
-    Some("org.apache.cassandra.auth.PasswordAuthenticator")
-  }
+    fn get_auth_token(&self) -> CBytes {
+        let mut token = vec![0];
+        token.extend_from_slice(self.username.as_bytes());
+        token.push(0);
+        token.extend_from_slice(self.password.as_bytes());
+
+        CBytes::new(token)
+    }
+
+    fn get_cassandra_name(&self) -> Option<&str> {
+        Some("org.apache.cassandra.auth.PasswordAuthenticator")
+    }
 }
 
 #[derive(Debug, Clone)]
 pub struct NoneAuthenticator;
 
 impl Authenticator for NoneAuthenticator {
-  fn get_auth_token(&self) -> CBytes {
-    CBytes::new(vec![0])
-  }
+    fn get_auth_token(&self) -> CBytes {
+        CBytes::new(vec![0])
+    }
 
-  fn get_cassandra_name(&self) -> Option<&str> {
-    None
-  }
+    fn get_cassandra_name(&self) -> Option<&str> {
+        None
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn test_password_authenticator_trait_impl() {
-    let authenticator = PasswordAuthenticator::new("a", "a");
-    let _ = authenticator_tester(Box::new(authenticator));
-  }
-
-  #[test]
-  fn test_password_authenticator_new() {
-    PasswordAuthenticator::new("foo", "bar");
-  }
-
-  #[test]
-  fn test_password_authenticator_get_cassandra_name() {
-    let auth = PasswordAuthenticator::new("foo", "bar");
-    assert_eq!(
-      auth.get_cassandra_name(),
-      Some("org.apache.cassandra.auth.PasswordAuthenticator")
-    );
-  }
-
-  #[test]
-  fn test_password_authenticator_get_auth_token() {
-    let auth = PasswordAuthenticator::new("foo", "bar");
-    let mut expected_token = vec![0];
-    expected_token.extend_from_slice("foo".as_bytes());
-    expected_token.push(0);
-    expected_token.extend_from_slice("bar".as_bytes());
-
-    assert_eq!(auth.get_auth_token().into_plain().unwrap(), expected_token);
-  }
-
-  #[test]
-  fn test_static_password_authenticator_trait_impl() {
-    let authenticator = StaticPasswordAuthenticator::new("a", "a");
-    let _ = authenticator_tester(Box::new(authenticator));
-  }
-
-  #[test]
-  fn test_static_password_authenticator_new() {
-    StaticPasswordAuthenticator::new("foo", "bar");
-  }
-
-  #[test]
-  fn test_static_password_authenticator_get_cassandra_name() {
-    let auth = StaticPasswordAuthenticator::new("foo", "bar");
-    assert_eq!(
-      auth.get_cassandra_name(),
-      Some("org.apache.cassandra.auth.PasswordAuthenticator")
-    );
-  }
-
-  #[test]
-  fn test_static_password_authenticator_get_auth_token() {
-    let auth = PasswordAuthenticator::new("foo", "bar");
-    let mut expected_token = vec![0];
-    expected_token.extend_from_slice("foo".as_bytes());
-    expected_token.push(0);
-    expected_token.extend_from_slice("bar".as_bytes());
-
-    assert_eq!(auth.get_auth_token().into_plain().unwrap(), expected_token);
-  }
-
-  #[test]
-  fn test_authenticator_none_get_cassandra_name() {
-    let auth = NoneAuthenticator;
-    assert_eq!(auth.get_cassandra_name(), None);
-    assert_eq!(auth.get_auth_token().into_plain().unwrap(), vec![0]);
-  }
-
-  fn authenticator_tester<A: Authenticator>(_authenticator: Box<A>) {}
+    use super::*;
+
+    #[test]
+    fn test_password_authenticator_trait_impl() {
+        let authenticator = PasswordAuthenticator::new("a", "a");
+        let _ = authenticator_tester(Box::new(authenticator));
+    }
+
+    #[test]
+    fn test_password_authenticator_new() {
+        PasswordAuthenticator::new("foo", "bar");
+    }
+
+    #[test]
+    fn test_password_authenticator_get_cassandra_name() {
+        let auth = PasswordAuthenticator::new("foo", "bar");
+        assert_eq!(
+            auth.get_cassandra_name(),
+            Some("org.apache.cassandra.auth.PasswordAuthenticator")
+        );
+    }
+
+    #[test]
+    fn test_password_authenticator_get_auth_token() {
+        let auth = PasswordAuthenticator::new("foo", "bar");
+        let mut expected_token = vec![0];
+        expected_token.extend_from_slice("foo".as_bytes());
+        expected_token.push(0);
+        expected_token.extend_from_slice("bar".as_bytes());
+
+        assert_eq!(auth.get_auth_token().into_plain().unwrap(), expected_token);
+    }
+
+    #[test]
+    fn test_static_password_authenticator_trait_impl() {
+        let authenticator = StaticPasswordAuthenticator::new("a", "a");
+        let _ = authenticator_tester(Box::new(authenticator));
+    }
+
+    #[test]
+    fn test_static_password_authenticator_new() {
+        StaticPasswordAuthenticator::new("foo", "bar");
+    }
+
+    #[test]
+    fn test_static_password_authenticator_get_cassandra_name() {
+        let auth = StaticPasswordAuthenticator::new("foo", "bar");
+        assert_eq!(
+            auth.get_cassandra_name(),
+            Some("org.apache.cassandra.auth.PasswordAuthenticator")
+        );
+    }
+
+    #[test]
+    fn test_static_password_authenticator_get_auth_token() {
+        let auth = PasswordAuthenticator::new("foo", "bar");
+        let mut expected_token = vec![0];
+        expected_token.extend_from_slice("foo".as_bytes());
+        expected_token.push(0);
+        expected_token.extend_from_slice("bar".as_bytes());
+
+        assert_eq!(auth.get_auth_token().into_plain().unwrap(), expected_token);
+    }
+
+    #[test]
+    fn test_authenticator_none_get_cassandra_name() {
+        let auth = NoneAuthenticator;
+        assert_eq!(auth.get_cassandra_name(), None);
+        assert_eq!(auth.get_auth_token().into_plain().unwrap(), vec![0]);
+    }
 
+    fn authenticator_tester<A: Authenticator>(_authenticator: Box<A>) {}
 }
diff --git a/src/cluster/config_ssl.rs b/src/cluster/config_ssl.rs
index cb3ee09..31efc38 100644
--- a/src/cluster/config_ssl.rs
+++ b/src/cluster/config_ssl.rs
@@ -10,113 +10,113 @@ pub struct ClusterSslConfig<'a, A: Authenticator + Sized>(pub Vec<NodeSslConfig<
 /// Single node SSL connection config.
 #[derive(Clone)]
 pub struct NodeSslConfig<'a, A> {
-  pub addr: &'a str,
-  pub authenticator: A,
-  pub ssl_connector: SslConnector,
-  pub max_size: u32,
-  pub min_idle: Option<u32>,
-  pub max_lifetime: Option<Duration>,
-  pub idle_timeout: Option<Duration>,
-  pub connection_timeout: Duration,
+    pub addr: &'a str,
+    pub authenticator: A,
+    pub ssl_connector: SslConnector,
+    pub max_size: u32,
+    pub min_idle: Option<u32>,
+    pub max_lifetime: Option<Duration>,
+    pub idle_timeout: Option<Duration>,
+    pub connection_timeout: Duration,
 }
 
 /// Builder structure that helps to configure SSL connection for node.
 pub struct NodeSslConfigBuilder<'a, A> {
-  addr: &'a str,
-  authenticator: A,
-  ssl_connector: SslConnector,
-  max_size: Option<u32>,
-  min_idle: Option<u32>,
-  max_lifetime: Option<Duration>,
-  idle_timeout: Option<Duration>,
-  connection_timeout: Option<Duration>,
+    addr: &'a str,
+    authenticator: A,
+    ssl_connector: SslConnector,
+    max_size: Option<u32>,
+    min_idle: Option<u32>,
+    max_lifetime: Option<Duration>,
+    idle_timeout: Option<Duration>,
+    connection_timeout: Option<Duration>,
 }
 
 impl<'a, A: Authenticator + Sized> NodeSslConfigBuilder<'a, A> {
-  const DEFAULT_MAX_SIZE: u32 = 10;
-  const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30);
+    const DEFAULT_MAX_SIZE: u32 = 10;
+    const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30);
 
-  /// `NodeSslConfigBuilder` constructor function. It receives
-  /// * node socket address as a string
-  /// * authenticator
-  /// * SSL connector structure (for more details see [openssl docs](https://docs.rs/openssl/0.10.12/openssl/ssl/struct.SslConnector.html))
-  pub fn new<'b>(
-    addr: &'b str,
-    authenticator: A,
-    ssl_connector: SslConnector,
-  ) -> NodeSslConfigBuilder<'b, A> {
-    NodeSslConfigBuilder {
-      addr,
-      authenticator,
-      ssl_connector,
-      max_size: None,
-      min_idle: None,
-      max_lifetime: None,
-      idle_timeout: None,
-      connection_timeout: None,
+    /// `NodeSslConfigBuilder` constructor function. It receives
+    /// * node socket address as a string
+    /// * authenticator
+    /// * SSL connector structure (for more details see [openssl docs](https://docs.rs/openssl/0.10.12/openssl/ssl/struct.SslConnector.html))
+    pub fn new<'b>(
+        addr: &'b str,
+        authenticator: A,
+        ssl_connector: SslConnector,
+    ) -> NodeSslConfigBuilder<'b, A> {
+        NodeSslConfigBuilder {
+            addr,
+            authenticator,
+            ssl_connector,
+            max_size: None,
+            min_idle: None,
+            max_lifetime: None,
+            idle_timeout: None,
+            connection_timeout: None,
+        }
     }
-  }
 
-  /// Sets the maximum number of connections managed by the pool.
-  /// Defaults to 10.
-  pub fn max_size(mut self, size: u32) -> Self {
-    self.max_size = Some(size);
-    self
-  }
+    /// Sets the maximum number of connections managed by the pool.
+    /// Defaults to 10.
+    pub fn max_size(mut self, size: u32) -> Self {
+        self.max_size = Some(size);
+        self
+    }
 
-  /// Sets the minimum idle connection count maintained by the pool.
-  /// If set, the pool will try to maintain at least this many idle
-  /// connections at all times, while respecting the value of `max_size`.
-  /// Defaults to None (equivalent to the value of `max_size`).
-  pub fn min_idle(mut self, min_idle: Option<u32>) -> Self {
-    self.max_size = min_idle;
-    self
-  }
+    /// Sets the minimum idle connection count maintained by the pool.
+    /// If set, the pool will try to maintain at least this many idle
+    /// connections at all times, while respecting the value of `max_size`.
+    /// Defaults to None (equivalent to the value of `max_size`).
+    pub fn min_idle(mut self, min_idle: Option<u32>) -> Self {
+        self.max_size = min_idle;
+        self
+    }
 
-  /// Sets the maximum lifetime of connections in the pool.
-  /// If set, connections will be closed after existing for at most 30 seconds beyond this duration.
-  /// If a connection reaches its maximum lifetime while checked out it will be closed when it is returned to the pool.
-  /// Defaults to 30 minutes.
-  pub fn max_lifetime(mut self, max_lifetime: Option<Duration>) -> Self {
-    self.max_lifetime = max_lifetime;
-    self
-  }
+    /// Sets the maximum lifetime of connections in the pool.
+    /// If set, connections will be closed after existing for at most 30 seconds beyond this duration.
+    /// If a connection reaches its maximum lifetime while checked out it will be closed when it is returned to the pool.
+    /// Defaults to 30 minutes.
+    pub fn max_lifetime(mut self, max_lifetime: Option<Duration>) -> Self {
+        self.max_lifetime = max_lifetime;
+        self
+    }
 
-  /// Sets the idle timeout used by the pool.
-  /// If set, connections will be closed after sitting idle for at most 30 seconds beyond this duration.
-  /// Defaults to 10 minutes.
-  pub fn idle_timeout(mut self, idle_timeout: Option<Duration>) -> Self {
-    self.idle_timeout = idle_timeout;
-    self
-  }
+    /// Sets the idle timeout used by the pool.
+    /// If set, connections will be closed after sitting idle for at most 30 seconds beyond this duration.
+    /// Defaults to 10 minutes.
+    pub fn idle_timeout(mut self, idle_timeout: Option<Duration>) -> Self {
+        self.idle_timeout = idle_timeout;
+        self
+    }
 
-  /// Sets the connection timeout used by the pool.
-  /// Defaults to 30 seconds.
-  pub fn connection_timeout(mut self, connection_timeout: Duration) -> Self {
-    self.connection_timeout = Some(connection_timeout);
-    self
-  }
+    /// Sets the connection timeout used by the pool.
+    /// Defaults to 30 seconds.
+    pub fn connection_timeout(mut self, connection_timeout: Duration) -> Self {
+        self.connection_timeout = Some(connection_timeout);
+        self
+    }
 
-  /// Sets new authenticator.
-  pub fn authenticator(mut self, authenticator: A) -> Self {
-    self.authenticator = authenticator;
-    self
-  }
+    /// Sets new authenticator.
+    pub fn authenticator(mut self, authenticator: A) -> Self {
+        self.authenticator = authenticator;
+        self
+    }
 
-  /// Finalizes building process and returns `NodeSslConfig`
-  pub fn build(self) -> NodeSslConfig<'a, A> {
-    NodeSslConfig {
-      addr: self.addr,
-      authenticator: self.authenticator,
-      ssl_connector: self.ssl_connector,
+    /// Finalizes building process and returns `NodeSslConfig`
+    pub fn build(self) -> NodeSslConfig<'a, A> {
+        NodeSslConfig {
+            addr: self.addr,
+            authenticator: self.authenticator,
+            ssl_connector: self.ssl_connector,
 
-      max_size: self.max_size.unwrap_or(Self::DEFAULT_MAX_SIZE),
-      min_idle: self.min_idle,
-      max_lifetime: self.max_lifetime,
-      idle_timeout: self.idle_timeout,
-      connection_timeout: self
-        .connection_timeout
-        .unwrap_or(Self::DEFAULT_CONNECTION_TIMEOUT),
+            max_size: self.max_size.unwrap_or(Self::DEFAULT_MAX_SIZE),
+            min_idle: self.min_idle,
+            max_lifetime: self.max_lifetime,
+            idle_timeout: self.idle_timeout,
+            connection_timeout: self
+                .connection_timeout
+                .unwrap_or(Self::DEFAULT_CONNECTION_TIMEOUT),
+        }
     }
-  }
 }
diff --git a/src/cluster/config_tcp.rs b/src/cluster/config_tcp.rs
index 2e6a4ac..3f1459c 100644
--- a/src/cluster/config_tcp.rs
+++ b/src/cluster/config_tcp.rs
@@ -8,104 +8,104 @@ pub struct ClusterTcpConfig<'a, A: Authenticator + Sized>(pub Vec<NodeTcpConfig<
 /// Single node TCP connection config.
 #[derive(Clone)]
 pub struct NodeTcpConfig<'a, A> {
-  pub addr: &'a str,
-  pub authenticator: A,
-  pub max_size: u32,
-  pub min_idle: Option<u32>,
-  pub max_lifetime: Option<Duration>,
-  pub idle_timeout: Option<Duration>,
-  pub connection_timeout: Duration,
+    pub addr: &'a str,
+    pub authenticator: A,
+    pub max_size: u32,
+    pub min_idle: Option<u32>,
+    pub max_lifetime: Option<Duration>,
+    pub idle_timeout: Option<Duration>,
+    pub connection_timeout: Duration,
 }
 
 /// Builder structure that helps to configure TCP connection for node.
 pub struct NodeTcpConfigBuilder<'a, A> {
-  addr: &'a str,
-  authenticator: A,
-  max_size: Option<u32>,
-  min_idle: Option<u32>,
-  max_lifetime: Option<Duration>,
-  idle_timeout: Option<Duration>,
-  connection_timeout: Option<Duration>,
+    addr: &'a str,
+    authenticator: A,
+    max_size: Option<u32>,
+    min_idle: Option<u32>,
+    max_lifetime: Option<Duration>,
+    idle_timeout: Option<Duration>,
+    connection_timeout: Option<Duration>,
 }
 
 impl<'a, A: Authenticator + Sized> NodeTcpConfigBuilder<'a, A> {
-  const DEFAULT_MAX_SIZE: u32 = 10;
-  const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30);
+    const DEFAULT_MAX_SIZE: u32 = 10;
+    const DEFAULT_CONNECTION_TIMEOUT: Duration = Duration::from_secs(30);
 
-  /// `NodeTcpConfigBuilder` constructor function. It receivesthread::spawn(move || {
-  /// * node socket address as a string
-  /// * authenticator
-  pub fn new<'b>(addr: &'b str, authenticator: A) -> NodeTcpConfigBuilder<'b, A> {
-    NodeTcpConfigBuilder {
-      addr,
-      authenticator,
-      max_size: None,
-      min_idle: None,
-      max_lifetime: None,
-      idle_timeout: None,
-      connection_timeout: None,
+    /// `NodeTcpConfigBuilder` constructor function. It receivesthread::spawn(move || {
+    /// * node socket address as a string
+    /// * authenticator
+    pub fn new<'b>(addr: &'b str, authenticator: A) -> NodeTcpConfigBuilder<'b, A> {
+        NodeTcpConfigBuilder {
+            addr,
+            authenticator,
+            max_size: None,
+            min_idle: None,
+            max_lifetime: None,
+            idle_timeout: None,
+            connection_timeout: None,
+        }
     }
-  }
 
-  /// Sets the maximum number of connections managed by the pool.
-  /// Defaults to 10.
-  pub fn max_size(mut self, size: u32) -> Self {
-    self.max_size = Some(size);
-    self
-  }
+    /// Sets the maximum number of connections managed by the pool.
+    /// Defaults to 10.
+    pub fn max_size(mut self, size: u32) -> Self {
+        self.max_size = Some(size);
+        self
+    }
 
-  /// Sets the minimum idle connection count maintained by the pool.
-  /// If set, the pool will try to maintain at least this many idle
-  /// connections at all times, while respecting the value of `max_size`.
-  /// Defaults to None (equivalent to the value of `max_size`).
-  pub fn min_idle(mut self, min_idle: Option<u32>) -> Self {
-    self.max_size = min_idle;
-    self
-  }
+    /// Sets the minimum idle connection count maintained by the pool.
+    /// If set, the pool will try to maintain at least this many idle
+    /// connections at all times, while respecting the value of `max_size`.
+    /// Defaults to None (equivalent to the value of `max_size`).
+    pub fn min_idle(mut self, min_idle: Option<u32>) -> Self {
+        self.max_size = min_idle;
+        self
+    }
 
-  /// Sets the maximum lifetime of connections in the pool.
-  /// If set, connections will be closed after existing for at most 30 seconds beyond this duration.
-  /// If a connection reaches its maximum lifetime while checked out it will be closed when it is returned to the pool.
-  /// Defaults to 30 minutes.
-  pub fn max_lifetime(mut self, max_lifetime: Option<Duration>) -> Self {
-    self.max_lifetime = max_lifetime;
-    self
-  }
+    /// Sets the maximum lifetime of connections in the pool.
+    /// If set, connections will be closed after existing for at most 30 seconds beyond this duration.
+    /// If a connection reaches its maximum lifetime while checked out it will be closed when it is returned to the pool.
+    /// Defaults to 30 minutes.
+    pub fn max_lifetime(mut self, max_lifetime: Option<Duration>) -> Self {
+        self.max_lifetime = max_lifetime;
+        self
+    }
 
-  /// Sets the idle timeout used by the pool.
-  /// If set, connections will be closed after sitting idle for at most 30 seconds beyond this duration.
-  /// Defaults to 10 minutes.
-  pub fn idle_timeout(mut self, idle_timeout: Option<Duration>) -> Self {
-    self.idle_timeout = idle_timeout;
-    self
-  }
+    /// Sets the idle timeout used by the pool.
+    /// If set, connections will be closed after sitting idle for at most 30 seconds beyond this duration.
+    /// Defaults to 10 minutes.
+    pub fn idle_timeout(mut self, idle_timeout: Option<Duration>) -> Self {
+        self.idle_timeout = idle_timeout;
+        self
+    }
 
-  /// Sets the connection timeout used by the pool.
-  /// Defaults to 30 seconds.
-  pub fn connection_timeout(mut self, connection_timeout: Duration) -> Self {
-    self.connection_timeout = Some(connection_timeout);
-    self
-  }
+    /// Sets the connection timeout used by the pool.
+    /// Defaults to 30 seconds.
+    pub fn connection_timeout(mut self, connection_timeout: Duration) -> Self {
+        self.connection_timeout = Some(connection_timeout);
+        self
+    }
 
-  /// Sets new authenticator.
-  pub fn authenticator(mut self, authenticator: A) -> Self {
-    self.authenticator = authenticator;
-    self
-  }
+    /// Sets new authenticator.
+    pub fn authenticator(mut self, authenticator: A) -> Self {
+        self.authenticator = authenticator;
+        self
+    }
 
-  /// Finalizes building process and returns `NodeSslConfig`
-  pub fn build(self) -> NodeTcpConfig<'a, A> {
-    NodeTcpConfig {
-      addr: self.addr,
-      authenticator: self.authenticator,
+    /// Finalizes building process and returns `NodeSslConfig`
+    pub fn build(self) -> NodeTcpConfig<'a, A> {
+        NodeTcpConfig {
+            addr: self.addr,
+            authenticator: self.authenticator,
 
-      max_size: self.max_size.unwrap_or(Self::DEFAULT_MAX_SIZE),
-      min_idle: self.min_idle,
-      max_lifetime: self.max_lifetime,
-      idle_timeout: self.idle_timeout,
-      connection_timeout: self
-        .connection_timeout
-        .unwrap_or(Self::DEFAULT_CONNECTION_TIMEOUT),
+            max_size: self.max_size.unwrap_or(Self::DEFAULT_MAX_SIZE),
+            min_idle: self.min_idle,
+            max_lifetime: self.max_lifetime,
+            idle_timeout: self.idle_timeout,
+            connection_timeout: self
+                .connection_timeout
+                .unwrap_or(Self::DEFAULT_CONNECTION_TIMEOUT),
+        }
     }
-  }
 }
diff --git a/src/cluster/mod.rs b/src/cluster/mod.rs
index 49d0ca8..4250a7f 100644
--- a/src/cluster/mod.rs
+++ b/src/cluster/mod.rs
@@ -16,10 +16,10 @@ pub use crate::cluster::config_tcp::{ClusterTcpConfig, NodeTcpConfig, NodeTcpCon
 pub use crate::cluster::pager::{PagerState, QueryPager, SessionPager};
 #[cfg(feature = "ssl")]
 pub use crate::cluster::ssl_connection_pool::{
-  new_ssl_pool, SslConnectionPool, SslConnectionsManager,
+    new_ssl_pool, SslConnectionPool, SslConnectionsManager,
 };
 pub use crate::cluster::tcp_connection_pool::{
-  new_tcp_pool, startup, TcpConnectionPool, TcpConnectionsManager,
+    new_tcp_pool, startup, TcpConnectionPool, TcpConnectionsManager,
 };
 
 use crate::compression::Compression;
@@ -30,33 +30,33 @@ use crate::transport::CDRSTransport;
 /// `GetConnection` trait provides a unified interface for Session to get a connection
 /// from a load balancer
 pub trait GetConnection<
-  T: CDRSTransport + Send + Sync + 'static,
-  M: r2d2::ManageConnection<Connection = cell::RefCell<T>, Error = error::Error>,
+    T: CDRSTransport + Send + Sync + 'static,
+    M: r2d2::ManageConnection<Connection = cell::RefCell<T>, Error = error::Error>,
 >
 {
-  /// Returns connection from a load balancer.
-  fn get_connection(&self) -> Option<r2d2::PooledConnection<M>>;
+    /// Returns connection from a load balancer.
+    fn get_connection(&self) -> Option<r2d2::PooledConnection<M>>;
 }
 
 /// `GetCompressor` trait provides a unified interface for Session to get a compressor
 /// for further decompressing received data.
 pub trait GetCompressor<'a> {
-  /// Returns actual compressor.
-  fn get_compressor(&self) -> Compression;
+    /// Returns actual compressor.
+    fn get_compressor(&self) -> Compression;
 }
 
 /// `CDRSSession` trait wrap ups whole query functionality. Use it only if whole query
 /// machinery is needed and direct sub traits otherwise.
 pub trait CDRSSession<
-  'a,
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = cell::RefCell<T>, Error = error::Error>,
+    'a,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = cell::RefCell<T>, Error = error::Error>,
 >:
-  GetCompressor<'static>
-  + GetConnection<T, M>
-  + QueryExecutor<T, M>
-  + PrepareExecutor<T, M>
-  + ExecExecutor<T, M>
-  + BatchExecutor<T, M>
+    GetCompressor<'static>
+    + GetConnection<T, M>
+    + QueryExecutor<T, M>
+    + PrepareExecutor<T, M>
+    + ExecExecutor<T, M>
+    + BatchExecutor<T, M>
 {
 }
diff --git a/src/cluster/pager.rs b/src/cluster/pager.rs
index 9e474a1..d47949c 100644
--- a/src/cluster/pager.rs
+++ b/src/cluster/pager.rs
@@ -11,205 +11,206 @@ use crate::types::rows::Row;
 use crate::types::CBytes;
 
 pub struct SessionPager<
-  'a,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-  S: CDRSSession<'static, T, M> + 'a,
-  T: CDRSTransport + 'static,
+    'a,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    S: CDRSSession<'static, T, M> + 'a,
+    T: CDRSTransport + 'static,
 > {
-  page_size: i32,
-  session: &'a S,
-  transport_type: PhantomData<&'a T>,
-  connection_type: PhantomData<&'a M>,
+    page_size: i32,
+    session: &'a S,
+    transport_type: PhantomData<&'a T>,
+    connection_type: PhantomData<&'a M>,
 }
 
 impl<
-    'a,
-    'b: 'a,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    S: CDRSSession<'static, T, M>,
-    T: CDRSTransport + 'static,
-  > SessionPager<'a, M, S, T>
+        'a,
+        'b: 'a,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        S: CDRSSession<'static, T, M>,
+        T: CDRSTransport + 'static,
+    > SessionPager<'a, M, S, T>
 {
-  pub fn new(session: &'b S, page_size: i32) -> SessionPager<'a, M, S, T> {
-    SessionPager {
-      session,
-      page_size,
-      transport_type: PhantomData,
-      connection_type: PhantomData,
+    pub fn new(session: &'b S, page_size: i32) -> SessionPager<'a, M, S, T> {
+        SessionPager {
+            session,
+            page_size,
+            transport_type: PhantomData,
+            connection_type: PhantomData,
+        }
     }
-  }
 
-  pub fn query_with_pager_state<Q>(
-    &'a mut self,
-    query: Q,
-    state: PagerState,
-  ) -> QueryPager<'a, Q, SessionPager<'a, M, S, T>>
-  where
-    Q: ToString,
-  {
-    QueryPager {
-      pager: self,
-      pager_state: state,
-      query,
-    }
-  }
-
-  pub fn query<Q>(&'a mut self, query: Q) -> QueryPager<'a, Q, SessionPager<'a, M, S, T>>
-  where
-    Q: ToString,
-  {
-    self.query_with_pager_state(query, PagerState::new())
-  }
-
-  pub fn exec_with_pager_state(
-    &'a mut self,
-    query: &'a PreparedQuery,
-    state: PagerState,
-  ) -> ExecPager<'a, SessionPager<'a, M, S, T>> {
-    ExecPager {
-      pager: self,
-      pager_state: state,
-      query,
-    }
-  }
-
-  pub fn exec(&'a mut self, query: &'a PreparedQuery) -> ExecPager<'a, SessionPager<'a, M, S, T>> {
-    self.exec_with_pager_state(query, PagerState::new())
-  }
+    pub fn query_with_pager_state<Q>(
+        &'a mut self,
+        query: Q,
+        state: PagerState,
+    ) -> QueryPager<'a, Q, SessionPager<'a, M, S, T>>
+    where
+        Q: ToString,
+    {
+        QueryPager {
+            pager: self,
+            pager_state: state,
+            query,
+        }
+    }
+
+    pub fn query<Q>(&'a mut self, query: Q) -> QueryPager<'a, Q, SessionPager<'a, M, S, T>>
+    where
+        Q: ToString,
+    {
+        self.query_with_pager_state(query, PagerState::new())
+    }
+
+    pub fn exec_with_pager_state(
+        &'a mut self,
+        query: &'a PreparedQuery,
+        state: PagerState,
+    ) -> ExecPager<'a, SessionPager<'a, M, S, T>> {
+        ExecPager {
+            pager: self,
+            pager_state: state,
+            query,
+        }
+    }
+
+    pub fn exec(
+        &'a mut self,
+        query: &'a PreparedQuery,
+    ) -> ExecPager<'a, SessionPager<'a, M, S, T>> {
+        self.exec_with_pager_state(query, PagerState::new())
+    }
 }
 
 pub struct QueryPager<'a, Q: ToString, P: 'a> {
-  pager: &'a mut P,
-  pager_state: PagerState,
-  query: Q,
+    pager: &'a mut P,
+    pager_state: PagerState,
+    query: Q,
 }
 
 impl<
-    'a,
-    Q: ToString,
-    T: CDRSTransport + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    S: CDRSSession<'static, T, M>,
-  > QueryPager<'a, Q, SessionPager<'a, M, S, T>>
+        'a,
+        Q: ToString,
+        T: CDRSTransport + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        S: CDRSSession<'static, T, M>,
+    > QueryPager<'a, Q, SessionPager<'a, M, S, T>>
 {
-  pub fn next(&mut self) -> error::Result<Vec<Row>> {
-    let mut params = QueryParamsBuilder::new().page_size(self.pager.page_size);
-    if self.pager_state.cursor.is_some() {
-      params = params.paging_state(self.pager_state.cursor.clone().unwrap());
-    }
-
-    let body = self
-      .pager
-      .session
-      .query_with_params(self.query.to_string(), params.finalize())
-      .and_then(|frame| frame.get_body())?;
-
-    let metadata_res: error::Result<RowsMetadata> = body
-      .as_rows_metadata()
-      .ok_or("Pager query should yield a vector of rows".into());
-    let metadata = metadata_res?;
-
-    self.pager_state.has_more_pages =
-      Some(RowsMetadataFlag::has_has_more_pages(metadata.flags.clone()));
-    self.pager_state.cursor = metadata.paging_state.clone();
-    body
-      .into_rows()
-      .ok_or("Pager query should yield a vector of rows".into())
-  }
-
-  pub fn has_more(&self) -> bool {
-    self.pager_state.has_more_pages.unwrap_or(false)
-  }
-
-  /// This method returns a copy of pager state so
-  /// the state may be used later for continuing paging.
-  pub fn pager_state(&self) -> PagerState {
-    self.pager_state.clone()
-  }
+    pub fn next(&mut self) -> error::Result<Vec<Row>> {
+        let mut params = QueryParamsBuilder::new().page_size(self.pager.page_size);
+        if self.pager_state.cursor.is_some() {
+            params = params.paging_state(self.pager_state.cursor.clone().unwrap());
+        }
+
+        let body = self
+            .pager
+            .session
+            .query_with_params(self.query.to_string(), params.finalize())
+            .and_then(|frame| frame.get_body())?;
+
+        let metadata_res: error::Result<RowsMetadata> = body
+            .as_rows_metadata()
+            .ok_or("Pager query should yield a vector of rows".into());
+        let metadata = metadata_res?;
+
+        self.pager_state.has_more_pages =
+            Some(RowsMetadataFlag::has_has_more_pages(metadata.flags.clone()));
+        self.pager_state.cursor = metadata.paging_state.clone();
+        body.into_rows()
+            .ok_or("Pager query should yield a vector of rows".into())
+    }
+
+    pub fn has_more(&self) -> bool {
+        self.pager_state.has_more_pages.unwrap_or(false)
+    }
+
+    /// This method returns a copy of pager state so
+    /// the state may be used later for continuing paging.
+    pub fn pager_state(&self) -> PagerState {
+        self.pager_state.clone()
+    }
 }
 
 pub struct ExecPager<'a, P: 'a> {
-  pager: &'a mut P,
-  pager_state: PagerState,
-  query: &'a PreparedQuery,
+    pager: &'a mut P,
+    pager_state: PagerState,
+    query: &'a PreparedQuery,
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    S: CDRSSession<'static, T, M>,
-  > ExecPager<'a, SessionPager<'a, M, S, T>>
+        'a,
+        T: CDRSTransport + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        S: CDRSSession<'static, T, M>,
+    > ExecPager<'a, SessionPager<'a, M, S, T>>
 {
-  pub fn next(&mut self) -> error::Result<Vec<Row>> {
-    let mut params = QueryParamsBuilder::new().page_size(self.pager.page_size);
-    if self.pager_state.cursor.is_some() {
-      params = params.paging_state(self.pager_state.cursor.clone().unwrap());
-    }
-
-    let body = self
-      .pager
-      .session
-      .exec_with_params(self.query, params.finalize())
-      .and_then(|frame| frame.get_body())?;
-
-    let metadata_res: error::Result<RowsMetadata> = body
-      .as_rows_metadata()
-      .ok_or("Pager query should yield a vector of rows".into());
-    let metadata = metadata_res?;
-
-    self.pager_state.has_more_pages =
-      Some(RowsMetadataFlag::has_has_more_pages(metadata.flags.clone()));
-    self.pager_state.cursor = metadata.paging_state.clone();
-    body
-      .into_rows()
-      .ok_or("Pager query should yield a vector of rows".into())
-  }
-
-  pub fn has_more(&self) -> bool {
-    self.pager_state.has_more_pages.unwrap_or(false)
-  }
-
-  /// This method returns a copy of pager state so
-  /// the state may be used later for continuing paging.
-  pub fn pager_state(&self) -> PagerState {
-    self.pager_state.clone()
-  }
+    pub fn next(&mut self) -> error::Result<Vec<Row>> {
+        let mut params = QueryParamsBuilder::new().page_size(self.pager.page_size);
+        if self.pager_state.cursor.is_some() {
+            params = params.paging_state(self.pager_state.cursor.clone().unwrap());
+        }
+
+        let body = self
+            .pager
+            .session
+            .exec_with_params(self.query, params.finalize())
+            .and_then(|frame| frame.get_body())?;
+
+        let metadata_res: error::Result<RowsMetadata> = body
+            .as_rows_metadata()
+            .ok_or("Pager query should yield a vector of rows".into());
+        let metadata = metadata_res?;
+
+        self.pager_state.has_more_pages =
+            Some(RowsMetadataFlag::has_has_more_pages(metadata.flags.clone()));
+        self.pager_state.cursor = metadata.paging_state.clone();
+        body.into_rows()
+            .ok_or("Pager query should yield a vector of rows".into())
+    }
+
+    pub fn has_more(&self) -> bool {
+        self.pager_state.has_more_pages.unwrap_or(false)
+    }
+
+    /// This method returns a copy of pager state so
+    /// the state may be used later for continuing paging.
+    pub fn pager_state(&self) -> PagerState {
+        self.pager_state.clone()
+    }
 }
 
 #[derive(Clone, PartialEq, Debug)]
 pub struct PagerState {
-  cursor: Option<CBytes>,
-  has_more_pages: Option<bool>,
+    cursor: Option<CBytes>,
+    has_more_pages: Option<bool>,
 }
 
 impl PagerState {
-  pub fn new() -> Self {
-    PagerState {
-      cursor: None,
-      has_more_pages: None,
+    pub fn new() -> Self {
+        PagerState {
+            cursor: None,
+            has_more_pages: None,
+        }
     }
-  }
 
-  pub fn with_cursor(cursor: CBytes) -> Self {
-    PagerState {
-      cursor: Some(cursor),
-      has_more_pages: None,
+    pub fn with_cursor(cursor: CBytes) -> Self {
+        PagerState {
+            cursor: Some(cursor),
+            has_more_pages: None,
+        }
     }
-  }
 
-  pub fn with_cursor_and_more_flag(cursor: CBytes, has_more: bool) -> Self {
-    PagerState {
-      cursor: Some(cursor),
-      has_more_pages: Some(has_more),
+    pub fn with_cursor_and_more_flag(cursor: CBytes, has_more: bool) -> Self {
+        PagerState {
+            cursor: Some(cursor),
+            has_more_pages: Some(has_more),
+        }
     }
-  }
 
-  pub fn has_more(&self) -> bool {
-    self.has_more_pages.unwrap_or(false)
-  }
+    pub fn has_more(&self) -> bool {
+        self.has_more_pages.unwrap_or(false)
+    }
 
-  pub fn get_cursor(&self) -> Option<CBytes> {
-    self.cursor.clone()
-  }
+    pub fn get_cursor(&self) -> Option<CBytes> {
+        self.cursor.clone()
+    }
 }
diff --git a/src/cluster/session.rs b/src/cluster/session.rs
index 6946d8b..9f11970 100644
--- a/src/cluster/session.rs
+++ b/src/cluster/session.rs
@@ -5,8 +5,8 @@ use std::io::Write;
 #[cfg(feature = "ssl")]
 use crate::cluster::{new_ssl_pool, ClusterSslConfig, SslConnectionPool};
 use crate::cluster::{
-  new_tcp_pool, startup, CDRSSession, ClusterTcpConfig, GetCompressor, GetConnection,
-  TcpConnectionPool,
+    new_tcp_pool, startup, CDRSSession, ClusterTcpConfig, GetCompressor, GetConnection,
+    TcpConnectionPool,
 };
 use crate::error;
 use crate::load_balancing::LoadBalancingStrategy;
@@ -30,88 +30,88 @@ use openssl::ssl::SslConnector;
 /// `compression` field contains data compressor that will be used
 /// for decompressing data received from Cassandra server.
 pub struct Session<LB> {
-  load_balancing: LB,
-  #[allow(dead_code)]
-  pub compression: Compression,
+    load_balancing: LB,
+    #[allow(dead_code)]
+    pub compression: Compression,
 }
 
 impl<'a, LB> GetCompressor<'a> for Session<LB> {
-  /// Returns compression that current session has.
-  fn get_compressor(&self) -> Compression {
-    self.compression.clone()
-  }
+    /// Returns compression that current session has.
+    fn get_compressor(&self) -> Compression {
+        self.compression.clone()
+    }
 }
 
 impl<'a, LB: Sized> Session<LB> {
-  /// Basing on current session returns new `SessionPager` that can be used
-  /// for performing paged queries.
-  pub fn paged<
-    T: CDRSTransport + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error>,
-  >(
-    &'a self,
-    page_size: i32,
-  ) -> SessionPager<'a, M, Session<LB>, T>
-  where
-    Session<LB>: CDRSSession<'static, T, M>,
-  {
-    return SessionPager::new(self, page_size);
-  }
+    /// Basing on current session returns new `SessionPager` that can be used
+    /// for performing paged queries.
+    pub fn paged<
+        T: CDRSTransport + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error>,
+    >(
+        &'a self,
+        page_size: i32,
+    ) -> SessionPager<'a, M, Session<LB>, T>
+    where
+        Session<LB>: CDRSSession<'static, T, M>,
+    {
+        return SessionPager::new(self, page_size);
+    }
 }
 
 impl<
-    T: CDRSTransport + Send + Sync + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>>,
-  > GetConnection<T, M> for Session<LB>
+        T: CDRSTransport + Send + Sync + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>>,
+    > GetConnection<T, M> for Session<LB>
 {
-  fn get_connection(&self) -> Option<r2d2::PooledConnection<M>> {
-    self.load_balancing.next().and_then(|pool| pool.get().ok())
-  }
+    fn get_connection(&self) -> Option<r2d2::PooledConnection<M>> {
+        self.load_balancing.next().and_then(|pool| pool.get().ok())
+    }
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
-  > QueryExecutor<T, M> for Session<LB>
+        'a,
+        T: CDRSTransport + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
+    > QueryExecutor<T, M> for Session<LB>
 {
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-  > PrepareExecutor<T, M> for Session<LB>
+        'a,
+        T: CDRSTransport + 'static,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    > PrepareExecutor<T, M> for Session<LB>
 {
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-  > ExecExecutor<T, M> for Session<LB>
+        'a,
+        T: CDRSTransport + 'static,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    > ExecExecutor<T, M> for Session<LB>
 {
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-  > BatchExecutor<T, M> for Session<LB>
+        'a,
+        T: CDRSTransport + 'static,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    > BatchExecutor<T, M> for Session<LB>
 {
 }
 
 impl<
-    'a,
-    T: CDRSTransport + 'static,
-    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
-    LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
-  > CDRSSession<'a, T, M> for Session<LB>
+        'a,
+        T: CDRSTransport + 'static,
+        M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+        LB: LoadBalancingStrategy<r2d2::Pool<M>> + Sized,
+    > CDRSSession<'a, T, M> for Session<LB>
 {
 }
 
@@ -121,26 +121,26 @@ impl<
 /// * cluster config
 /// * load balancing strategy (cannot be changed during `Session` life time).
 pub fn new<'a, A, LB>(
-  node_configs: &ClusterTcpConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterTcpConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_tcp_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_tcp_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::None,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::None,
+    })
 }
 
 /// Creates new session that will perform queries with Snappy compression. `Compression` type
@@ -149,26 +149,26 @@ where
 /// * cluster config
 /// * load balancing strategy (cannot be changed during `Session` life time).
 pub fn new_snappy<'a, A, LB>(
-  node_configs: &ClusterTcpConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterTcpConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_tcp_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_tcp_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::Snappy,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::Snappy,
+    })
 }
 
 /// Creates new session that will perform queries with LZ4 compression. `Compression` type
@@ -177,47 +177,47 @@ where
 /// * cluster config
 /// * load balancing strategy (cannot be changed during `Session` life time).
 pub fn new_lz4<'a, A, LB>(
-  node_configs: &ClusterTcpConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterTcpConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<TcpConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<TcpConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_tcp_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_tcp_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::Lz4,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::Lz4,
+    })
 }
 
 impl<'a, L> Session<L> {
-  /// Returns new event listener.
-  pub fn listen<A: Authenticator + 'static + Sized>(
-    &self,
-    node: &str,
-    authenticator: A,
-    events: Vec<SimpleServerEvent>,
-  ) -> error::Result<(Listener<RefCell<TransportTcp>>, EventStream)> {
-    let compression = self.get_compressor();
-    let transport = TransportTcp::new(&node).map(RefCell::new)?;
-
-    startup(&transport, &authenticator)?;
-
-    let query_frame = Frame::new_req_register(events).into_cbytes();
-    transport.borrow_mut().write(query_frame.as_slice())?;
-    parse_frame(&transport, &compression)?;
-
-    Ok(new_listener(transport))
-  }
+    /// Returns new event listener.
+    pub fn listen<A: Authenticator + 'static + Sized>(
+        &self,
+        node: &str,
+        authenticator: A,
+        events: Vec<SimpleServerEvent>,
+    ) -> error::Result<(Listener<RefCell<TransportTcp>>, EventStream)> {
+        let compression = self.get_compressor();
+        let transport = TransportTcp::new(&node).map(RefCell::new)?;
+
+        startup(&transport, &authenticator)?;
+
+        let query_frame = Frame::new_req_register(events).into_cbytes();
+        transport.borrow_mut().write(query_frame.as_slice())?;
+        parse_frame(&transport, &compression)?;
+
+        Ok(new_listener(transport))
+    }
 }
 
 /// Creates new SSL-based session that will perform queries without any compression. `Compression` type
@@ -227,26 +227,26 @@ impl<'a, L> Session<L> {
 /// * load balancing strategy (cannot be changed during `Session` life time).
 #[cfg(feature = "ssl")]
 pub fn new_ssl<'a, A, LB>(
-  node_configs: &ClusterSslConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterSslConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_ssl_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_ssl_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::None,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::None,
+    })
 }
 
 /// Creates new SSL-based session that will perform queries with Snappy compression. `Compression` type
@@ -256,26 +256,26 @@ where
 /// * load balancing strategy (cannot be changed during `Session` life time).
 #[cfg(feature = "ssl")]
 pub fn new_snappy_ssl<'a, A, LB>(
-  node_configs: &ClusterSslConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterSslConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_ssl_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_ssl_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::Snappy,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::Snappy,
+    })
 }
 
 /// Creates new SSL-based session that will perform queries with LZ4 compression. `Compression` type
@@ -285,47 +285,47 @@ where
 /// * load balancing strategy (cannot be changed during `Session` life time).
 #[cfg(feature = "ssl")]
 pub fn new_lz4_ssl<'a, A, LB>(
-  node_configs: &ClusterSslConfig<'a, A>,
-  mut load_balancing: LB,
+    node_configs: &ClusterSslConfig<'a, A>,
+    mut load_balancing: LB,
 ) -> error::Result<Session<LB>>
 where
-  A: Authenticator + 'static + Sized,
-  LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
+    A: Authenticator + 'static + Sized,
+    LB: LoadBalancingStrategy<SslConnectionPool<A>> + Sized,
 {
-  let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
+    let mut nodes: Vec<SslConnectionPool<A>> = Vec::with_capacity(node_configs.0.len());
 
-  for node_config in &node_configs.0 {
-    let node_connection_pool = new_ssl_pool(node_config.clone())?;
-    nodes.push(node_connection_pool);
-  }
+    for node_config in &node_configs.0 {
+        let node_connection_pool = new_ssl_pool(node_config.clone())?;
+        nodes.push(node_connection_pool);
+    }
 
-  load_balancing.init(nodes);
+    load_balancing.init(nodes);
 
-  Ok(Session {
-    load_balancing,
-    compression: Compression::Lz4,
-  })
+    Ok(Session {
+        load_balancing,
+        compression: Compression::Lz4,
+    })
 }
 
 /// Returns new SSL-based event listener.
 #[cfg(feature = "ssl")]
 impl<'a, L> Session<L> {
-  pub fn listen_ssl<A: Authenticator + 'static + Sized>(
-    &self,
-    node: (&str, &SslConnector),
-    authenticator: A,
-    events: Vec<SimpleServerEvent>,
-  ) -> error::Result<(Listener<RefCell<TransportTls>>, EventStream)> {
-    let (addr_ref, ssl_connector_ref) = node;
-    let compression = self.get_compressor();
-    let transport = TransportTls::new(addr_ref, ssl_connector_ref).map(RefCell::new)?;
-
-    startup(&transport, &authenticator)?;
-
-    let query_frame = Frame::new_req_register(events).into_cbytes();
-    transport.borrow_mut().write(query_frame.as_slice())?;
-    parse_frame(&transport, &compression)?;
-
-    Ok(new_listener(transport))
-  }
+    pub fn listen_ssl<A: Authenticator + 'static + Sized>(
+        &self,
+        node: (&str, &SslConnector),
+        authenticator: A,
+        events: Vec<SimpleServerEvent>,
+    ) -> error::Result<(Listener<RefCell<TransportTls>>, EventStream)> {
+        let (addr_ref, ssl_connector_ref) = node;
+        let compression = self.get_compressor();
+        let transport = TransportTls::new(addr_ref, ssl_connector_ref).map(RefCell::new)?;
+
+        startup(&transport, &authenticator)?;
+
+        let query_frame = Frame::new_req_register(events).into_cbytes();
+        transport.borrow_mut().write(query_frame.as_slice())?;
+        parse_frame(&transport, &compression)?;
+
+        Ok(new_listener(transport))
+    }
 }
diff --git a/src/cluster/ssl_connection_pool.rs b/src/cluster/ssl_connection_pool.rs
index 26cfc0e..23c166d 100644
--- a/src/cluster/ssl_connection_pool.rs
+++ b/src/cluster/ssl_connection_pool.rs
@@ -20,60 +20,60 @@ pub type SslConnectionPool<A> = Pool<SslConnectionsManager<A>>;
 ///
 /// Used internally for SSL Session for holding connections to a specific Cassandra node.
 pub fn new_ssl_pool<'a, A: Authenticator + Send + Sync + 'static>(
-  node_config: NodeSslConfig<'a, A>,
+    node_config: NodeSslConfig<'a, A>,
 ) -> error::Result<SslConnectionPool<A>> {
-  let manager = SslConnectionsManager::new(
-    node_config.addr,
-    node_config.authenticator,
-    node_config.ssl_connector,
-  );
+    let manager = SslConnectionsManager::new(
+        node_config.addr,
+        node_config.authenticator,
+        node_config.ssl_connector,
+    );
 
-  Builder::new()
-    .max_size(node_config.max_size)
-    .min_idle(node_config.min_idle)
-    .max_lifetime(node_config.max_lifetime)
-    .idle_timeout(node_config.idle_timeout)
-    .connection_timeout(node_config.connection_timeout)
-    .build(manager)
-    .map_err(|err| error::Error::from(err.description()))
+    Builder::new()
+        .max_size(node_config.max_size)
+        .min_idle(node_config.min_idle)
+        .max_lifetime(node_config.max_lifetime)
+        .idle_timeout(node_config.idle_timeout)
+        .connection_timeout(node_config.connection_timeout)
+        .build(manager)
+        .map_err(|err| error::Error::from(err.description()))
 }
 
 /// `r2d2` connection manager.
 pub struct SslConnectionsManager<A> {
-  addr: String,
-  ssl_connector: SslConnector,
-  auth: A,
+    addr: String,
+    ssl_connector: SslConnector,
+    auth: A,
 }
 
 impl<A> SslConnectionsManager<A> {
-  pub fn new<S: ToString>(addr: S, auth: A, ssl_connector: SslConnector) -> Self {
-    SslConnectionsManager {
-      addr: addr.to_string(),
-      auth,
-      ssl_connector,
+    pub fn new<S: ToString>(addr: S, auth: A, ssl_connector: SslConnector) -> Self {
+        SslConnectionsManager {
+            addr: addr.to_string(),
+            auth,
+            ssl_connector,
+        }
     }
-  }
 }
 
 impl<A: Authenticator + 'static + Send + Sync> ManageConnection for SslConnectionsManager<A> {
-  type Connection = RefCell<TransportTls>;
-  type Error = error::Error;
+    type Connection = RefCell<TransportTls>;
+    type Error = error::Error;
 
-  fn connect(&self) -> Result<Self::Connection, Self::Error> {
-    let transport = RefCell::new(TransportTls::new(&self.addr, &self.ssl_connector)?);
-    startup(&transport, &self.auth)?;
+    fn connect(&self) -> Result<Self::Connection, Self::Error> {
+        let transport = RefCell::new(TransportTls::new(&self.addr, &self.ssl_connector)?);
+        startup(&transport, &self.auth)?;
 
-    Ok(transport)
-  }
+        Ok(transport)
+    }
 
-  fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> {
-    let options_frame = Frame::new_req_options().into_cbytes();
-    conn.borrow_mut().write(options_frame.as_slice())?;
+    fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> {
+        let options_frame = Frame::new_req_options().into_cbytes();
+        conn.borrow_mut().write(options_frame.as_slice())?;
 
-    parse_frame(conn, &Compression::None {}).map(|_| ())
-  }
+        parse_frame(conn, &Compression::None {}).map(|_| ())
+    }
 
-  fn has_broken(&self, conn: &mut Self::Connection) -> bool {
-    !conn.borrow().is_alive()
-  }
+    fn has_broken(&self, conn: &mut Self::Connection) -> bool {
+        !conn.borrow().is_alive()
+    }
 }
diff --git a/src/cluster/tcp_connection_pool.rs b/src/cluster/tcp_connection_pool.rs
index 43662ea..1f4a919 100644
--- a/src/cluster/tcp_connection_pool.rs
+++ b/src/cluster/tcp_connection_pool.rs
@@ -19,121 +19,122 @@ pub type TcpConnectionPool<A> = Pool<TcpConnectionsManager<A>>;
 ///
 /// Used internally for TCP Session for holding connections to a specific Cassandra node.
 pub fn new_tcp_pool<'a, A: Authenticator + Send + Sync + 'static>(
-  node_config: NodeTcpConfig<'a, A>,
+    node_config: NodeTcpConfig<'a, A>,
 ) -> error::Result<TcpConnectionPool<A>> {
-  let manager = TcpConnectionsManager::new(node_config.addr.to_string(), node_config.authenticator);
-
-  Builder::new()
-    .max_size(node_config.max_size)
-    .min_idle(node_config.min_idle)
-    .max_lifetime(node_config.max_lifetime)
-    .idle_timeout(node_config.idle_timeout)
-    .connection_timeout(node_config.connection_timeout)
-    .build(manager)
-    .map_err(|err| error::Error::from(err.description()))
+    let manager =
+        TcpConnectionsManager::new(node_config.addr.to_string(), node_config.authenticator);
+
+    Builder::new()
+        .max_size(node_config.max_size)
+        .min_idle(node_config.min_idle)
+        .max_lifetime(node_config.max_lifetime)
+        .idle_timeout(node_config.idle_timeout)
+        .connection_timeout(node_config.connection_timeout)
+        .build(manager)
+        .map_err(|err| error::Error::from(err.description()))
 }
 
 /// `r2d2` connection manager.
 pub struct TcpConnectionsManager<A> {
-  addr: String,
-  auth: A,
+    addr: String,
+    auth: A,
 }
 
 impl<A> TcpConnectionsManager<A> {
-  pub fn new<S: ToString>(addr: S, auth: A) -> Self {
-    TcpConnectionsManager {
-      addr: addr.to_string(),
-      auth,
+    pub fn new<S: ToString>(addr: S, auth: A) -> Self {
+        TcpConnectionsManager {
+            addr: addr.to_string(),
+            auth,
+        }
     }
-  }
 }
 
 impl<A: Authenticator + 'static + Send + Sync> ManageConnection for TcpConnectionsManager<A> {
-  type Connection = RefCell<TransportTcp>;
-  type Error = error::Error;
+    type Connection = RefCell<TransportTcp>;
+    type Error = error::Error;
 
-  fn connect(&self) -> Result<Self::Connection, Self::Error> {
-    let transport = RefCell::new(TransportTcp::new(&self.addr)?);
-    startup(&transport, &self.auth)?;
+    fn connect(&self) -> Result<Self::Connection, Self::Error> {
+        let transport = RefCell::new(TransportTcp::new(&self.addr)?);
+        startup(&transport, &self.auth)?;
 
-    Ok(transport)
-  }
+        Ok(transport)
+    }
 
-  fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> {
-    let options_frame = Frame::new_req_options().into_cbytes();
-    conn.borrow_mut().write(options_frame.as_slice())?;
+    fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error> {
+        let options_frame = Frame::new_req_options().into_cbytes();
+        conn.borrow_mut().write(options_frame.as_slice())?;
 
-    parse_frame(conn, &Compression::None {}).map(|_| ())
-  }
+        parse_frame(conn, &Compression::None {}).map(|_| ())
+    }
 
-  fn has_broken(&self, conn: &mut Self::Connection) -> bool {
-    !conn.borrow().is_alive()
-  }
+    fn has_broken(&self, conn: &mut Self::Connection) -> bool {
+        !conn.borrow().is_alive()
+    }
 }
 
 pub fn startup<'b, T: CDRSTransport + 'static, A: Authenticator + 'static + Sized>(
-  transport: &RefCell<T>,
-  session_authenticator: &'b A,
+    transport: &RefCell<T>,
+    session_authenticator: &'b A,
 ) -> error::Result<()> {
-  let ref mut compression = Compression::None;
-  let startup_frame = Frame::new_req_startup(compression.as_str()).into_cbytes();
+    let ref mut compression = Compression::None;
+    let startup_frame = Frame::new_req_startup(compression.as_str()).into_cbytes();
 
-  transport.borrow_mut().write(startup_frame.as_slice())?;
+    transport.borrow_mut().write(startup_frame.as_slice())?;
 
-  let start_response = parse_frame(transport, compression)?;
+    let start_response = parse_frame(transport, compression)?;
 
-  if start_response.opcode == Opcode::Ready {
-    return Ok(());
-  }
+    if start_response.opcode == Opcode::Ready {
+        return Ok(());
+    }
 
-  if start_response.opcode == Opcode::Authenticate {
-    let body = start_response.get_body()?;
-    let authenticator = body.get_authenticator().expect(
-      "Cassandra Server did communicate that it neededs
+    if start_response.opcode == Opcode::Authenticate {
+        let body = start_response.get_body()?;
+        let authenticator = body.get_authenticator().expect(
+            "Cassandra Server did communicate that it neededs
                 authentication but the auth schema was missing in the body response",
-    );
-
-    // This creates a new scope; avoiding a clone
-    // and we check whether
-    // 1. any authenticators has been passed in by client and if not send error back
-    // 2. authenticator is provided by the client and `auth_scheme` presented by
-    //      the server and client are same if not send error back
-    // 3. if it falls through it means the preliminary conditions are true
-
-    let auth_check = session_authenticator
-      .get_cassandra_name()
-      .ok_or(error::Error::General(
-        "No authenticator was provided".to_string(),
-      ))
-      .map(|auth| {
-        if authenticator != auth {
-          let io_err = io::Error::new(
-            io::ErrorKind::NotFound,
-            format!(
-              "Unsupported type of authenticator. {:?} got,
+        );
+
+        // This creates a new scope; avoiding a clone
+        // and we check whether
+        // 1. any authenticators has been passed in by client and if not send error back
+        // 2. authenticator is provided by the client and `auth_scheme` presented by
+        //      the server and client are same if not send error back
+        // 3. if it falls through it means the preliminary conditions are true
+
+        let auth_check = session_authenticator
+            .get_cassandra_name()
+            .ok_or(error::Error::General(
+                "No authenticator was provided".to_string(),
+            ))
+            .map(|auth| {
+                if authenticator != auth {
+                    let io_err = io::Error::new(
+                        io::ErrorKind::NotFound,
+                        format!(
+                            "Unsupported type of authenticator. {:?} got,
                              but {} is supported.",
-              authenticator, auth
-            ),
-          );
-          return Err(error::Error::Io(io_err));
+                            authenticator, auth
+                        ),
+                    );
+                    return Err(error::Error::Io(io_err));
+                }
+                Ok(())
+            });
+
+        if let Err(err) = auth_check {
+            return Err(err);
         }
-        Ok(())
-      });
-
-    if let Err(err) = auth_check {
-      return Err(err);
-    }
 
-    let auth_token_bytes = session_authenticator.get_auth_token().into_cbytes();
-    transport.borrow_mut().write(
-      Frame::new_req_auth_response(auth_token_bytes)
-        .into_cbytes()
-        .as_slice(),
-    )?;
-    parse_frame(transport, compression)?;
+        let auth_token_bytes = session_authenticator.get_auth_token().into_cbytes();
+        transport.borrow_mut().write(
+            Frame::new_req_auth_response(auth_token_bytes)
+                .into_cbytes()
+                .as_slice(),
+        )?;
+        parse_frame(transport, compression)?;
 
-    return Ok(());
-  }
+        return Ok(());
+    }
 
-  unreachable!();
+    unreachable!();
 }
diff --git a/src/compression.rs b/src/compression.rs
index 612a8d0..0ed1875 100644
--- a/src/compression.rs
+++ b/src/compression.rs
@@ -270,5 +270,4 @@ mod tests {
             .expect("Should work without exceptions");
         assert_eq!(snappy_compression.decode(encoded).unwrap(), v);
     }
-
 }
diff --git a/src/consistency.rs b/src/consistency.rs
index f4e942d..8c71082 100644
--- a/src/consistency.rs
+++ b/src/consistency.rs
@@ -12,260 +12,259 @@ use crate::types::*;
 /// To find more details about each consistency level please refer to Cassandra official docs.
 #[derive(Debug, PartialEq, Clone, Copy)]
 pub enum Consistency {
-  /// A write must be written to the commit log and memtable on all replica nodes in the cluster
-  /// for that partition key.	Provides the highest consistency
-  /// and the lowest availability of any other level.
-  Any,
-  ///
-  /// A write must be written to the commit log and memtable of at least one replica node.
-  /// Satisfies the needs of most users because consistency requirements are not stringent.
-  One,
-  /// A write must be written to the commit log and memtable of at least two replica nodes.
-  /// Similar to ONE.
-  Two,
-  /// A write must be written to the commit log and memtable of at least three replica nodes.
-  /// Similar to TWO.
-  Three,
-  /// A write must be written to the commit log and memtable on a quorum of replica nodes.
-  /// Provides strong consistency if you can tolerate some level of failure.
-  Quorum,
-  /// A write must be written to the commit log and memtable on all replica nodes in the cluster
-  /// for that partition key.
-  /// Provides the highest consistency and the lowest availability of any other level.
-  All,
-  /// Strong consistency. A write must be written to the commit log and memtable on a quorum
-  /// of replica nodes in the same data center as thecoordinator node.
-  /// Avoids latency of inter-data center communication.
-  /// Used in multiple data center clusters with a rack-aware replica placement strategy,
-  /// such as NetworkTopologyStrategy, and a properly configured snitch.
-  /// Use to maintain consistency locally (within the single data center).
-  /// Can be used with SimpleStrategy.
-  LocalQuorum,
-  /// Strong consistency. A write must be written to the commit log and memtable on a quorum of
-  /// replica nodes in all data center.
-  /// Used in multiple data center clusters to strictly maintain consistency at the same level
-  /// in each data center. For example, choose this level
-  /// if you want a read to fail when a data center is down and the QUORUM
-  /// cannot be reached on that data center.
-  EachQuorum,
-  /// Achieves linearizable consistency for lightweight transactions by preventing unconditional
-  /// updates.	You cannot configure this level as a normal consistency level,
-  /// configured at the driver level using the consistency level field.
-  /// You configure this level using the serial consistency field
-  /// as part of the native protocol operation. See failure scenarios.
-  Serial,
-  /// Same as SERIAL but confined to the data center. A write must be written conditionally
-  /// to the commit log and memtable on a quorum of replica nodes in the same data center.
-  /// Same as SERIAL. Used for disaster recovery. See failure scenarios.
-  LocalSerial,
-  /// A write must be sent to, and successfully acknowledged by,
-  /// at least one replica node in the local data center.
-  /// In a multiple data center clusters, a consistency level of ONE is often desirable,
-  /// but cross-DC traffic is not. LOCAL_ONE accomplishes this.
-  /// For security and quality reasons, you can use this consistency level
-  /// in an offline datacenter to prevent automatic connection
-  /// to online nodes in other data centers if an offline node goes down.
-  LocalOne,
-  /// This is an error scenario either the client code doesn't support it or server is sending
-  /// bad headers
-  Unknown,
+    /// A write must be written to the commit log and memtable on all replica nodes in the cluster
+    /// for that partition key.	Provides the highest consistency
+    /// and the lowest availability of any other level.
+    Any,
+    ///
+    /// A write must be written to the commit log and memtable of at least one replica node.
+    /// Satisfies the needs of most users because consistency requirements are not stringent.
+    One,
+    /// A write must be written to the commit log and memtable of at least two replica nodes.
+    /// Similar to ONE.
+    Two,
+    /// A write must be written to the commit log and memtable of at least three replica nodes.
+    /// Similar to TWO.
+    Three,
+    /// A write must be written to the commit log and memtable on a quorum of replica nodes.
+    /// Provides strong consistency if you can tolerate some level of failure.
+    Quorum,
+    /// A write must be written to the commit log and memtable on all replica nodes in the cluster
+    /// for that partition key.
+    /// Provides the highest consistency and the lowest availability of any other level.
+    All,
+    /// Strong consistency. A write must be written to the commit log and memtable on a quorum
+    /// of replica nodes in the same data center as thecoordinator node.
+    /// Avoids latency of inter-data center communication.
+    /// Used in multiple data center clusters with a rack-aware replica placement strategy,
+    /// such as NetworkTopologyStrategy, and a properly configured snitch.
+    /// Use to maintain consistency locally (within the single data center).
+    /// Can be used with SimpleStrategy.
+    LocalQuorum,
+    /// Strong consistency. A write must be written to the commit log and memtable on a quorum of
+    /// replica nodes in all data center.
+    /// Used in multiple data center clusters to strictly maintain consistency at the same level
+    /// in each data center. For example, choose this level
+    /// if you want a read to fail when a data center is down and the QUORUM
+    /// cannot be reached on that data center.
+    EachQuorum,
+    /// Achieves linearizable consistency for lightweight transactions by preventing unconditional
+    /// updates.	You cannot configure this level as a normal consistency level,
+    /// configured at the driver level using the consistency level field.
+    /// You configure this level using the serial consistency field
+    /// as part of the native protocol operation. See failure scenarios.
+    Serial,
+    /// Same as SERIAL but confined to the data center. A write must be written conditionally
+    /// to the commit log and memtable on a quorum of replica nodes in the same data center.
+    /// Same as SERIAL. Used for disaster recovery. See failure scenarios.
+    LocalSerial,
+    /// A write must be sent to, and successfully acknowledged by,
+    /// at least one replica node in the local data center.
+    /// In a multiple data center clusters, a consistency level of ONE is often desirable,
+    /// but cross-DC traffic is not. LOCAL_ONE accomplishes this.
+    /// For security and quality reasons, you can use this consistency level
+    /// in an offline datacenter to prevent automatic connection
+    /// to online nodes in other data centers if an offline node goes down.
+    LocalOne,
+    /// This is an error scenario either the client code doesn't support it or server is sending
+    /// bad headers
+    Unknown,
 }
 
 impl Default for Consistency {
-  fn default() -> Consistency {
-    Consistency::One
-  }
+    fn default() -> Consistency {
+        Consistency::One
+    }
 }
 
 impl IntoBytes for Consistency {
-  fn into_cbytes(&self) -> Vec<u8> {
-    match *self {
-      Consistency::Any => to_short(0x0000),
-      Consistency::One => to_short(0x0001),
-      Consistency::Two => to_short(0x0002),
-      Consistency::Three => to_short(0x0003),
-      Consistency::Quorum => to_short(0x0004),
-      Consistency::All => to_short(0x0005),
-      Consistency::LocalQuorum => to_short(0x0006),
-      Consistency::EachQuorum => to_short(0x0007),
-      Consistency::Serial => to_short(0x0008),
-      Consistency::LocalSerial => to_short(0x0009),
-      Consistency::LocalOne => to_short(0x000A),
-      Consistency::Unknown => to_short(0x0063),
-      // giving Unknown a value of 99
+    fn into_cbytes(&self) -> Vec<u8> {
+        match *self {
+            Consistency::Any => to_short(0x0000),
+            Consistency::One => to_short(0x0001),
+            Consistency::Two => to_short(0x0002),
+            Consistency::Three => to_short(0x0003),
+            Consistency::Quorum => to_short(0x0004),
+            Consistency::All => to_short(0x0005),
+            Consistency::LocalQuorum => to_short(0x0006),
+            Consistency::EachQuorum => to_short(0x0007),
+            Consistency::Serial => to_short(0x0008),
+            Consistency::LocalSerial => to_short(0x0009),
+            Consistency::LocalOne => to_short(0x000A),
+            Consistency::Unknown => to_short(0x0063),
+            // giving Unknown a value of 99
+        }
     }
-  }
 }
 
 impl From<i32> for Consistency {
-  fn from(bytes: i32) -> Consistency {
-    match bytes {
-      0x0000 => Consistency::Any,
-      0x0001 => Consistency::One,
-      0x0002 => Consistency::Two,
-      0x0003 => Consistency::Three,
-      0x0004 => Consistency::Quorum,
-      0x0005 => Consistency::All,
-      0x0006 => Consistency::LocalQuorum,
-      0x0007 => Consistency::EachQuorum,
-      0x0008 => Consistency::Serial,
-      0x0009 => Consistency::LocalSerial,
-      0x000A => Consistency::LocalOne,
-      _ => Consistency::Unknown,
+    fn from(bytes: i32) -> Consistency {
+        match bytes {
+            0x0000 => Consistency::Any,
+            0x0001 => Consistency::One,
+            0x0002 => Consistency::Two,
+            0x0003 => Consistency::Three,
+            0x0004 => Consistency::Quorum,
+            0x0005 => Consistency::All,
+            0x0006 => Consistency::LocalQuorum,
+            0x0007 => Consistency::EachQuorum,
+            0x0008 => Consistency::Serial,
+            0x0009 => Consistency::LocalSerial,
+            0x000A => Consistency::LocalOne,
+            _ => Consistency::Unknown,
+        }
     }
-  }
 }
 
 impl FromBytes for Consistency {
-  fn from_bytes(bytes: &[u8]) -> error::Result<Consistency> {
-    try_from_bytes(bytes).map_err(Into::into).map(|b| match b {
-      0x0000 => Consistency::Any,
-      0x0001 => Consistency::One,
-      0x0002 => Consistency::Two,
-      0x0003 => Consistency::Three,
-      0x0004 => Consistency::Quorum,
-      0x0005 => Consistency::All,
-      0x0006 => Consistency::LocalQuorum,
-      0x0007 => Consistency::EachQuorum,
-      0x0008 => Consistency::Serial,
-      0x0009 => Consistency::LocalSerial,
-      0x000A => Consistency::LocalOne,
-      _ => Consistency::Unknown,
-    })
-  }
+    fn from_bytes(bytes: &[u8]) -> error::Result<Consistency> {
+        try_from_bytes(bytes).map_err(Into::into).map(|b| match b {
+            0x0000 => Consistency::Any,
+            0x0001 => Consistency::One,
+            0x0002 => Consistency::Two,
+            0x0003 => Consistency::Three,
+            0x0004 => Consistency::Quorum,
+            0x0005 => Consistency::All,
+            0x0006 => Consistency::LocalQuorum,
+            0x0007 => Consistency::EachQuorum,
+            0x0008 => Consistency::Serial,
+            0x0009 => Consistency::LocalSerial,
+            0x000A => Consistency::LocalOne,
+            _ => Consistency::Unknown,
+        })
+    }
 }
 
 impl FromCursor for Consistency {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<Consistency> {
-    let consistency_num = CIntShort::from_cursor(&mut cursor)? as i32;
-    Ok(Consistency::from(consistency_num))
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<Consistency> {
+        let consistency_num = CIntShort::from_cursor(&mut cursor)? as i32;
+        Ok(Consistency::from(consistency_num))
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::{FromBytes, FromCursor, IntoBytes};
-  use std::io::Cursor;
-
-  #[test]
-  fn test_consistency_into_cbytes() {
-    assert_eq!(Consistency::Any.into_cbytes(), &[0, 0]);
-    assert_eq!(Consistency::One.into_cbytes(), &[0, 1]);
-    assert_eq!(Consistency::Two.into_cbytes(), &[0, 2]);
-    assert_eq!(Consistency::Three.into_cbytes(), &[0, 3]);
-    assert_eq!(Consistency::Quorum.into_cbytes(), &[0, 4]);
-    assert_eq!(Consistency::All.into_cbytes(), &[0, 5]);
-    assert_eq!(Consistency::LocalQuorum.into_cbytes(), &[0, 6]);
-    assert_eq!(Consistency::EachQuorum.into_cbytes(), &[0, 7]);
-    assert_eq!(Consistency::Serial.into_cbytes(), &[0, 8]);
-    assert_eq!(Consistency::LocalSerial.into_cbytes(), &[0, 9]);
-    assert_eq!(Consistency::LocalOne.into_cbytes(), &[0, 10]);
-    assert_eq!(Consistency::Unknown.into_cbytes(), &[0, 99]);
-  }
+    use super::*;
+    use crate::frame::traits::{FromBytes, FromCursor, IntoBytes};
+    use std::io::Cursor;
 
-  #[test]
-  fn test_consistency_from() {
-    assert_eq!(Consistency::from(0), Consistency::Any);
-    assert_eq!(Consistency::from(1), Consistency::One);
-    assert_eq!(Consistency::from(2), Consistency::Two);
-    assert_eq!(Consistency::from(3), Consistency::Three);
-    assert_eq!(Consistency::from(4), Consistency::Quorum);
-    assert_eq!(Consistency::from(5), Consistency::All);
-    assert_eq!(Consistency::from(6), Consistency::LocalQuorum);
-    assert_eq!(Consistency::from(7), Consistency::EachQuorum);
-    assert_eq!(Consistency::from(8), Consistency::Serial);
-    assert_eq!(Consistency::from(9), Consistency::LocalSerial);
-    assert_eq!(Consistency::from(10), Consistency::LocalOne);
-    assert_eq!(Consistency::from(11), Consistency::Unknown);
-  }
+    #[test]
+    fn test_consistency_into_cbytes() {
+        assert_eq!(Consistency::Any.into_cbytes(), &[0, 0]);
+        assert_eq!(Consistency::One.into_cbytes(), &[0, 1]);
+        assert_eq!(Consistency::Two.into_cbytes(), &[0, 2]);
+        assert_eq!(Consistency::Three.into_cbytes(), &[0, 3]);
+        assert_eq!(Consistency::Quorum.into_cbytes(), &[0, 4]);
+        assert_eq!(Consistency::All.into_cbytes(), &[0, 5]);
+        assert_eq!(Consistency::LocalQuorum.into_cbytes(), &[0, 6]);
+        assert_eq!(Consistency::EachQuorum.into_cbytes(), &[0, 7]);
+        assert_eq!(Consistency::Serial.into_cbytes(), &[0, 8]);
+        assert_eq!(Consistency::LocalSerial.into_cbytes(), &[0, 9]);
+        assert_eq!(Consistency::LocalOne.into_cbytes(), &[0, 10]);
+        assert_eq!(Consistency::Unknown.into_cbytes(), &[0, 99]);
+    }
 
-  #[test]
-  fn test_consistency_from_bytes() {
-    assert_eq!(Consistency::from_bytes(&[0, 0]).unwrap(), Consistency::Any);
-    assert_eq!(Consistency::from_bytes(&[0, 1]).unwrap(), Consistency::One);
-    assert_eq!(Consistency::from_bytes(&[0, 2]).unwrap(), Consistency::Two);
-    assert_eq!(
-      Consistency::from_bytes(&[0, 3]).unwrap(),
-      Consistency::Three
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 4]).unwrap(),
-      Consistency::Quorum
-    );
-    assert_eq!(Consistency::from_bytes(&[0, 5]).unwrap(), Consistency::All);
-    assert_eq!(
-      Consistency::from_bytes(&[0, 6]).unwrap(),
-      Consistency::LocalQuorum
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 7]).unwrap(),
-      Consistency::EachQuorum
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 8]).unwrap(),
-      Consistency::Serial
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 9]).unwrap(),
-      Consistency::LocalSerial
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 10]).unwrap(),
-      Consistency::LocalOne
-    );
-    assert_eq!(
-      Consistency::from_bytes(&[0, 11]).unwrap(),
-      Consistency::Unknown
-    );
-  }
+    #[test]
+    fn test_consistency_from() {
+        assert_eq!(Consistency::from(0), Consistency::Any);
+        assert_eq!(Consistency::from(1), Consistency::One);
+        assert_eq!(Consistency::from(2), Consistency::Two);
+        assert_eq!(Consistency::from(3), Consistency::Three);
+        assert_eq!(Consistency::from(4), Consistency::Quorum);
+        assert_eq!(Consistency::from(5), Consistency::All);
+        assert_eq!(Consistency::from(6), Consistency::LocalQuorum);
+        assert_eq!(Consistency::from(7), Consistency::EachQuorum);
+        assert_eq!(Consistency::from(8), Consistency::Serial);
+        assert_eq!(Consistency::from(9), Consistency::LocalSerial);
+        assert_eq!(Consistency::from(10), Consistency::LocalOne);
+        assert_eq!(Consistency::from(11), Consistency::Unknown);
+    }
 
-  #[test]
-  fn test_consistency_from_cursor() {
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 0])).unwrap(),
-      Consistency::Any
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 1])).unwrap(),
-      Consistency::One
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 2])).unwrap(),
-      Consistency::Two
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 3])).unwrap(),
-      Consistency::Three
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 4])).unwrap(),
-      Consistency::Quorum
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 5])).unwrap(),
-      Consistency::All
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 6])).unwrap(),
-      Consistency::LocalQuorum
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 7])).unwrap(),
-      Consistency::EachQuorum
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 8])).unwrap(),
-      Consistency::Serial
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 9])).unwrap(),
-      Consistency::LocalSerial
-    );
-    assert_eq!(
-      Consistency::from_cursor(&mut Cursor::new(&[0, 10])).unwrap(),
-      Consistency::LocalOne
-    );
-  }
+    #[test]
+    fn test_consistency_from_bytes() {
+        assert_eq!(Consistency::from_bytes(&[0, 0]).unwrap(), Consistency::Any);
+        assert_eq!(Consistency::from_bytes(&[0, 1]).unwrap(), Consistency::One);
+        assert_eq!(Consistency::from_bytes(&[0, 2]).unwrap(), Consistency::Two);
+        assert_eq!(
+            Consistency::from_bytes(&[0, 3]).unwrap(),
+            Consistency::Three
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 4]).unwrap(),
+            Consistency::Quorum
+        );
+        assert_eq!(Consistency::from_bytes(&[0, 5]).unwrap(), Consistency::All);
+        assert_eq!(
+            Consistency::from_bytes(&[0, 6]).unwrap(),
+            Consistency::LocalQuorum
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 7]).unwrap(),
+            Consistency::EachQuorum
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 8]).unwrap(),
+            Consistency::Serial
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 9]).unwrap(),
+            Consistency::LocalSerial
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 10]).unwrap(),
+            Consistency::LocalOne
+        );
+        assert_eq!(
+            Consistency::from_bytes(&[0, 11]).unwrap(),
+            Consistency::Unknown
+        );
+    }
 
+    #[test]
+    fn test_consistency_from_cursor() {
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 0])).unwrap(),
+            Consistency::Any
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 1])).unwrap(),
+            Consistency::One
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 2])).unwrap(),
+            Consistency::Two
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 3])).unwrap(),
+            Consistency::Three
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 4])).unwrap(),
+            Consistency::Quorum
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 5])).unwrap(),
+            Consistency::All
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 6])).unwrap(),
+            Consistency::LocalQuorum
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 7])).unwrap(),
+            Consistency::EachQuorum
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 8])).unwrap(),
+            Consistency::Serial
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 9])).unwrap(),
+            Consistency::LocalSerial
+        );
+        assert_eq!(
+            Consistency::from_cursor(&mut Cursor::new(&[0, 10])).unwrap(),
+            Consistency::LocalOne
+        );
+    }
 }
diff --git a/src/error.rs b/src/error.rs
index f7dd8e2..4a766f6 100644
--- a/src/error.rs
+++ b/src/error.rs
@@ -18,89 +18,89 @@ pub type Result<T> = result::Result<T, Error>;
 /// a Server via result error frames.
 #[derive(Debug)]
 pub enum Error {
-  /// Internal IO error.
-  Io(io::Error),
-  /// Internal error that may be raised during `uuid::Uuid::from_bytes`
-  UUIDParse(BytesError),
-  /// General error
-  General(String),
-  /// Internal error that may be raised during `String::from_utf8`
-  FromUtf8(FromUtf8Error),
-  /// Internal Compression/Decompression error
-  Compression(CompressionError),
-  /// Server error.
-  Server(CDRSError),
+    /// Internal IO error.
+    Io(io::Error),
+    /// Internal error that may be raised during `uuid::Uuid::from_bytes`
+    UUIDParse(BytesError),
+    /// General error
+    General(String),
+    /// Internal error that may be raised during `String::from_utf8`
+    FromUtf8(FromUtf8Error),
+    /// Internal Compression/Decompression error
+    Compression(CompressionError),
+    /// Server error.
+    Server(CDRSError),
 }
 
 pub fn column_is_empty_err<T: Display>(column_name: T) -> Error {
-  Error::General(format!("Column or UDT property '{}' is empty", column_name))
+    Error::General(format!("Column or UDT property '{}' is empty", column_name))
 }
 
 impl fmt::Display for Error {
-  fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-    match *self {
-      Error::Io(ref err) => write!(f, "IO error: {}", err),
-      Error::Compression(ref err) => write!(f, "Compressor error: {}", err),
-      Error::Server(ref err) => write!(f, "Server error: {:?}", err.message),
-      Error::FromUtf8(ref err) => write!(f, "FromUtf8Error error: {:?}", err),
-      Error::UUIDParse(ref err) => write!(f, "UUIDParse error: {:?}", err),
-      Error::General(ref err) => write!(f, "GeneralParsing error: {:?}", err),
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match *self {
+            Error::Io(ref err) => write!(f, "IO error: {}", err),
+            Error::Compression(ref err) => write!(f, "Compressor error: {}", err),
+            Error::Server(ref err) => write!(f, "Server error: {:?}", err.message),
+            Error::FromUtf8(ref err) => write!(f, "FromUtf8Error error: {:?}", err),
+            Error::UUIDParse(ref err) => write!(f, "UUIDParse error: {:?}", err),
+            Error::General(ref err) => write!(f, "GeneralParsing error: {:?}", err),
+        }
     }
-  }
 }
 
 impl error::Error for Error {
-  fn description(&self) -> &str {
-    match *self {
-      Error::Io(ref err) => err.description(),
-      Error::Compression(ref err) => err.description(),
-      Error::Server(ref err) => err.message.as_str(),
-      Error::FromUtf8(ref err) => err.description(),
-      // FIXME: err.description not found in current scope, std::error::Error not satisfied
-      Error::UUIDParse(_) => "UUID Parse Error",
-      Error::General(ref err) => err.as_str(),
+    fn description(&self) -> &str {
+        match *self {
+            Error::Io(ref err) => err.description(),
+            Error::Compression(ref err) => err.description(),
+            Error::Server(ref err) => err.message.as_str(),
+            Error::FromUtf8(ref err) => err.description(),
+            // FIXME: err.description not found in current scope, std::error::Error not satisfied
+            Error::UUIDParse(_) => "UUID Parse Error",
+            Error::General(ref err) => err.as_str(),
+        }
     }
-  }
 }
 
 impl From<io::Error> for Error {
-  fn from(err: io::Error) -> Error {
-    Error::Io(err)
-  }
+    fn from(err: io::Error) -> Error {
+        Error::Io(err)
+    }
 }
 
 impl From<CDRSError> for Error {
-  fn from(err: CDRSError) -> Error {
-    Error::Server(err)
-  }
+    fn from(err: CDRSError) -> Error {
+        Error::Server(err)
+    }
 }
 
 impl From<CompressionError> for Error {
-  fn from(err: CompressionError) -> Error {
-    Error::Compression(err)
-  }
+    fn from(err: CompressionError) -> Error {
+        Error::Compression(err)
+    }
 }
 
 impl From<FromUtf8Error> for Error {
-  fn from(err: FromUtf8Error) -> Error {
-    Error::FromUtf8(err)
-  }
+    fn from(err: FromUtf8Error) -> Error {
+        Error::FromUtf8(err)
+    }
 }
 
 impl From<BytesError> for Error {
-  fn from(err: BytesError) -> Error {
-    Error::UUIDParse(err)
-  }
+    fn from(err: BytesError) -> Error {
+        Error::UUIDParse(err)
+    }
 }
 
 impl From<String> for Error {
-  fn from(err: String) -> Error {
-    Error::General(err)
-  }
+    fn from(err: String) -> Error {
+        Error::General(err)
+    }
 }
 
 impl<'a> From<&'a str> for Error {
-  fn from(err: &str) -> Error {
-    Error::General(err.to_string())
-  }
+    fn from(err: &str) -> Error {
+        Error::General(err.to_string())
+    }
 }
diff --git a/src/events.rs b/src/events.rs
index 39e58a8..612ded3 100644
--- a/src/events.rs
+++ b/src/events.rs
@@ -6,8 +6,8 @@ use std::sync::mpsc::{channel, Receiver, Sender};
 use crate::compression::Compression;
 use crate::error;
 use crate::frame::events::{
-  SchemaChange as FrameSchemaChange, ServerEvent as FrameServerEvent,
-  SimpleServerEvent as FrameSimpleServerEvent,
+    SchemaChange as FrameSchemaChange, ServerEvent as FrameServerEvent,
+    SimpleServerEvent as FrameSimpleServerEvent,
 };
 use crate::frame::parser::parse_frame;
 use crate::transport::CDRSTransport;
@@ -31,13 +31,13 @@ pub type SchemaChange = FrameSchemaChange;
 /// `EventStream` is an iterator which returns new events once they come.
 /// It is similar to `Receiver::iter`.
 pub fn new_listener<X>(transport: X) -> (Listener<X>, EventStream) {
-  let (tx, rx) = channel();
-  let listener = Listener {
-    transport: transport,
-    tx: tx,
-  };
-  let stream = EventStream { rx: rx };
-  (listener, stream)
+    let (tx, rx) = channel();
+    let listener = Listener {
+        transport: transport,
+        tx: tx,
+    };
+    let stream = EventStream { rx: rx };
+    (listener, stream)
 }
 
 /// `Listener` provides only one function `start` to start listening. It
@@ -45,42 +45,42 @@ pub fn new_listener<X>(transport: X) -> (Listener<X>, EventStream) {
 /// main thread.
 
 pub struct Listener<X> {
-  transport: X,
-  tx: Sender<ServerEvent>,
+    transport: X,
+    tx: Sender<ServerEvent>,
 }
 
 impl<X: CDRSTransport + 'static> Listener<RefCell<X>> {
-  /// It starts a process of listening to new events. Locks a frame.
-  pub fn start(self, compressor: &Compression) -> error::Result<()> {
-    loop {
-      let event_opt = parse_frame(&self.transport, compressor)?
-        .get_body()?
-        .into_server_event();
+    /// It starts a process of listening to new events. Locks a frame.
+    pub fn start(self, compressor: &Compression) -> error::Result<()> {
+        loop {
+            let event_opt = parse_frame(&self.transport, compressor)?
+                .get_body()?
+                .into_server_event();
 
-      let event = if event_opt.is_some() {
-        // unwrap is safe as we've checked that event_opt.is_some()
-        event_opt.unwrap().event as ServerEvent
-      } else {
-        continue;
-      };
-      match self.tx.send(event) {
-        Err(err) => return Err(error::Error::General(err.description().to_string())),
-        _ => continue,
-      }
+            let event = if event_opt.is_some() {
+                // unwrap is safe as we've checked that event_opt.is_some()
+                event_opt.unwrap().event as ServerEvent
+            } else {
+                continue;
+            };
+            match self.tx.send(event) {
+                Err(err) => return Err(error::Error::General(err.description().to_string())),
+                _ => continue,
+            }
+        }
     }
-  }
 }
 
 /// `EventStream` is an iterator which returns new events once they come.
 /// It is similar to `Receiver::iter`.
 pub struct EventStream {
-  rx: Receiver<ServerEvent>,
+    rx: Receiver<ServerEvent>,
 }
 
 impl Iterator for EventStream {
-  type Item = ServerEvent;
+    type Item = ServerEvent;
 
-  fn next(&mut self) -> Option<Self::Item> {
-    self.rx.recv().ok()
-  }
+    fn next(&mut self) -> Option<Self::Item> {
+        self.rx.recv().ok()
+    }
 }
diff --git a/src/frame/events.rs b/src/frame/events.rs
index 3056ee8..967391c 100644
--- a/src/frame/events.rs
+++ b/src/frame/events.rs
@@ -1,8 +1,8 @@
-use std::io::Cursor;
 use std::cmp::PartialEq;
+use std::io::Cursor;
 
-use crate::frame::traits::FromCursor;
 use crate::error;
+use crate::frame::traits::FromCursor;
 use crate::types::{CInet, CString, CStringList};
 
 // Event types
@@ -97,11 +97,15 @@ impl FromCursor for ServerEvent {
     fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<ServerEvent> {
         let event_type = CString::from_cursor(&mut cursor)?;
         match event_type.as_str() {
-            TOPOLOGY_CHANGE => {
-                Ok(ServerEvent::TopologyChange(TopologyChange::from_cursor(&mut cursor)?))
-            }
-            STATUS_CHANGE => Ok(ServerEvent::StatusChange(StatusChange::from_cursor(&mut cursor)?)),
-            SCHEMA_CHANGE => Ok(ServerEvent::SchemaChange(SchemaChange::from_cursor(&mut cursor)?)),
+            TOPOLOGY_CHANGE => Ok(ServerEvent::TopologyChange(TopologyChange::from_cursor(
+                &mut cursor,
+            )?)),
+            STATUS_CHANGE => Ok(ServerEvent::StatusChange(StatusChange::from_cursor(
+                &mut cursor,
+            )?)),
+            SCHEMA_CHANGE => Ok(ServerEvent::SchemaChange(SchemaChange::from_cursor(
+                &mut cursor,
+            )?)),
             _ => Err("Unexpected server event".into()),
         }
     }
@@ -119,8 +123,10 @@ impl FromCursor for TopologyChange {
         let change_type = TopologyChangeType::from_cursor(&mut cursor)?;
         let addr = CInet::from_cursor(&mut cursor)?;
 
-        Ok(TopologyChange { change_type: change_type,
-                            addr: addr, })
+        Ok(TopologyChange {
+            change_type: change_type,
+            addr: addr,
+        })
     }
 }
 
@@ -152,8 +158,10 @@ impl FromCursor for StatusChange {
         let change_type = StatusChangeType::from_cursor(&mut cursor)?;
         let addr = CInet::from_cursor(&mut cursor)?;
 
-        Ok(StatusChange { change_type: change_type,
-                          addr: addr, })
+        Ok(StatusChange {
+            change_type: change_type,
+            addr: addr,
+        })
     }
 }
 
@@ -187,9 +195,11 @@ impl FromCursor for SchemaChange {
         let target = Target::from_cursor(&mut cursor)?;
         let options = ChangeSchemeOptions::from_cursor_and_target(&mut cursor, &target)?;
 
-        Ok(SchemaChange { change_type: change_type,
-                          target: target,
-                          options: options, })
+        Ok(SchemaChange {
+            change_type: change_type,
+            target: target,
+            options: options,
+        })
     }
 }
 
@@ -252,9 +262,10 @@ pub enum ChangeSchemeOptions {
 }
 
 impl ChangeSchemeOptions {
-    fn from_cursor_and_target(mut cursor: &mut Cursor<&[u8]>,
-                              target: &Target)
-                              -> error::Result<ChangeSchemeOptions> {
+    fn from_cursor_and_target(
+        mut cursor: &mut Cursor<&[u8]>,
+        target: &Target,
+    ) -> error::Result<ChangeSchemeOptions> {
         Ok(match *target {
             Target::Keyspace => ChangeSchemeOptions::from_cursor_keyspace(&mut cursor)?,
             Target::Table | Target::Type => {
@@ -267,24 +278,28 @@ impl ChangeSchemeOptions {
     }
 
     fn from_cursor_keyspace(mut cursor: &mut Cursor<&[u8]>) -> error::Result<ChangeSchemeOptions> {
-        Ok(ChangeSchemeOptions::Keyspace(CString::from_cursor(&mut cursor)?.into_plain()))
+        Ok(ChangeSchemeOptions::Keyspace(
+            CString::from_cursor(&mut cursor)?.into_plain(),
+        ))
     }
 
-    fn from_cursor_table_type(mut cursor: &mut Cursor<&[u8]>)
-                              -> error::Result<ChangeSchemeOptions> {
+    fn from_cursor_table_type(
+        mut cursor: &mut Cursor<&[u8]>,
+    ) -> error::Result<ChangeSchemeOptions> {
         let keyspace = CString::from_cursor(&mut cursor)?.into_plain();
         let name = CString::from_cursor(&mut cursor)?.into_plain();
         Ok(ChangeSchemeOptions::TableType((keyspace, name)))
     }
 
-    fn from_cursor_function_aggregate(mut cursor: &mut Cursor<&[u8]>)
-                                      -> error::Result<ChangeSchemeOptions> {
+    fn from_cursor_function_aggregate(
+        mut cursor: &mut Cursor<&[u8]>,
+    ) -> error::Result<ChangeSchemeOptions> {
         let keyspace = CString::from_cursor(&mut cursor)?.into_plain();
         let name = CString::from_cursor(&mut cursor)?.into_plain();
         let types = CStringList::from_cursor(&mut cursor)?.into_plain();
-        Ok(ChangeSchemeOptions::FunctionAggregate((keyspace,
-                                                  name,
-                                                  types)))
+        Ok(ChangeSchemeOptions::FunctionAggregate((
+            keyspace, name, types,
+        )))
     }
 }
 
@@ -294,32 +309,42 @@ mod simple_server_event_test {
 
     #[test]
     fn as_string() {
-        assert_eq!(SimpleServerEvent::TopologyChange.as_string(),
-                   "TOPOLOGY_CHANGE".to_string());
-        assert_eq!(SimpleServerEvent::StatusChange.as_string(),
-                   "STATUS_CHANGE".to_string());
-        assert_eq!(SimpleServerEvent::SchemaChange.as_string(),
-                   "SCHEMA_CHANGE".to_string());
+        assert_eq!(
+            SimpleServerEvent::TopologyChange.as_string(),
+            "TOPOLOGY_CHANGE".to_string()
+        );
+        assert_eq!(
+            SimpleServerEvent::StatusChange.as_string(),
+            "STATUS_CHANGE".to_string()
+        );
+        assert_eq!(
+            SimpleServerEvent::SchemaChange.as_string(),
+            "SCHEMA_CHANGE".to_string()
+        );
     }
 }
 
 #[cfg(test)]
 mod topology_change_type_test {
     use super::*;
-    use std::io::Cursor;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn from_cursor() {
         let a = &[0, 8, 78, 69, 87, 95, 78, 79, 68, 69];
         let mut new_node: Cursor<&[u8]> = Cursor::new(a);
-        assert_eq!(TopologyChangeType::from_cursor(&mut new_node).unwrap(),
-                   TopologyChangeType::NewNode);
+        assert_eq!(
+            TopologyChangeType::from_cursor(&mut new_node).unwrap(),
+            TopologyChangeType::NewNode
+        );
 
         let b = &[0, 12, 82, 69, 77, 79, 86, 69, 68, 95, 78, 79, 68, 69];
         let mut removed_node: Cursor<&[u8]> = Cursor::new(b);
-        assert_eq!(TopologyChangeType::from_cursor(&mut removed_node).unwrap(),
-                   TopologyChangeType::RemovedNode);
+        assert_eq!(
+            TopologyChangeType::from_cursor(&mut removed_node).unwrap(),
+            TopologyChangeType::RemovedNode
+        );
     }
 
     #[test]
@@ -334,20 +359,24 @@ mod topology_change_type_test {
 #[cfg(test)]
 mod status_change_type_test {
     use super::*;
-    use std::io::Cursor;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn from_cursor() {
         let a = &[0, 2, 85, 80];
         let mut up: Cursor<&[u8]> = Cursor::new(a);
-        assert_eq!(StatusChangeType::from_cursor(&mut up).unwrap(),
-                   StatusChangeType::Up);
+        assert_eq!(
+            StatusChangeType::from_cursor(&mut up).unwrap(),
+            StatusChangeType::Up
+        );
 
         let b = &[0, 4, 68, 79, 87, 78];
         let mut down: Cursor<&[u8]> = Cursor::new(b);
-        assert_eq!(StatusChangeType::from_cursor(&mut down).unwrap(),
-                   StatusChangeType::Down);
+        assert_eq!(
+            StatusChangeType::from_cursor(&mut down).unwrap(),
+            StatusChangeType::Down
+        );
     }
 
     #[test]
@@ -362,25 +391,31 @@ mod status_change_type_test {
 #[cfg(test)]
 mod schema_change_type_test {
     use super::*;
-    use std::io::Cursor;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn from_cursor() {
         let a = &[0, 7, 67, 82, 69, 65, 84, 69, 68];
         let mut created: Cursor<&[u8]> = Cursor::new(a);
-        assert_eq!(ChangeType::from_cursor(&mut created).unwrap(),
-                   ChangeType::Created);
+        assert_eq!(
+            ChangeType::from_cursor(&mut created).unwrap(),
+            ChangeType::Created
+        );
 
         let b = &[0, 7, 85, 80, 68, 65, 84, 69, 68];
         let mut updated: Cursor<&[u8]> = Cursor::new(b);
-        assert_eq!(ChangeType::from_cursor(&mut updated).unwrap(),
-                   ChangeType::Updated);
+        assert_eq!(
+            ChangeType::from_cursor(&mut updated).unwrap(),
+            ChangeType::Updated
+        );
 
         let c = &[0, 7, 68, 82, 79, 80, 80, 69, 68];
         let mut dropped: Cursor<&[u8]> = Cursor::new(c);
-        assert_eq!(ChangeType::from_cursor(&mut dropped).unwrap(),
-                   ChangeType::Dropped);
+        assert_eq!(
+            ChangeType::from_cursor(&mut dropped).unwrap(),
+            ChangeType::Dropped
+        );
     }
 
     #[test]
@@ -395,15 +430,17 @@ mod schema_change_type_test {
 #[cfg(test)]
 mod schema_change_target_test {
     use super::*;
-    use std::io::Cursor;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn from_cursor() {
         let a = &[0, 8, 75, 69, 89, 83, 80, 65, 67, 69];
         let mut keyspace: Cursor<&[u8]> = Cursor::new(a);
-        assert_eq!(Target::from_cursor(&mut keyspace).unwrap(),
-                   Target::Keyspace);
+        assert_eq!(
+            Target::from_cursor(&mut keyspace).unwrap(),
+            Target::Keyspace
+        );
 
         let b = &[0, 5, 84, 65, 66, 76, 69];
         let mut table: Cursor<&[u8]> = Cursor::new(b);
@@ -415,13 +452,17 @@ mod schema_change_target_test {
 
         let d = &[0, 8, 70, 85, 78, 67, 84, 73, 79, 78];
         let mut function: Cursor<&[u8]> = Cursor::new(d);
-        assert_eq!(Target::from_cursor(&mut function).unwrap(),
-                   Target::Function);
+        assert_eq!(
+            Target::from_cursor(&mut function).unwrap(),
+            Target::Function
+        );
 
         let e = &[0, 9, 65, 71, 71, 82, 69, 71, 65, 84, 69];
         let mut aggregate: Cursor<&[u8]> = Cursor::new(e);
-        assert_eq!(Target::from_cursor(&mut aggregate).unwrap(),
-                   Target::Aggregate);
+        assert_eq!(
+            Target::from_cursor(&mut aggregate).unwrap(),
+            Target::Aggregate
+        );
     }
 
     #[test]
@@ -436,51 +477,17 @@ mod schema_change_target_test {
 #[cfg(test)]
 mod server_event {
     use super::*;
-    use std::io::Cursor;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn topology_change_new_node() {
-        let bytes = &[// topology change
-                      0,
-                      15,
-                      84,
-                      79,
-                      80,
-                      79,
-                      76,
-                      79,
-                      71,
-                      89,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // new node
-                      0,
-                      8,
-                      78,
-                      69,
-                      87,
-                      95,
-                      78,
-                      79,
-                      68,
-                      69,
-                      // 127.0.0.1:1
-                      0,
-                      4,
-                      127,
-                      0,
-                      0,
-                      1,
-                      0,
-                      0,
-                      0,
-                      1];
+        let bytes = &[
+            // topology change
+            0, 15, 84, 79, 80, 79, 76, 79, 71, 89, 95, 67, 72, 65, 78, 71, 69, // new node
+            0, 8, 78, 69, 87, 95, 78, 79, 68, 69, // 127.0.0.1:1
+            0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
+        ];
         let mut c: Cursor<&[u8]> = Cursor::new(bytes);
         let event = ServerEvent::from_cursor(&mut c).unwrap();
         match event {
@@ -494,50 +501,13 @@ mod server_event {
 
     #[test]
     fn topology_change_removed_node() {
-        let bytes = &[// topology change
-                      0,
-                      15,
-                      84,
-                      79,
-                      80,
-                      79,
-                      76,
-                      79,
-                      71,
-                      89,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // removed node
-                      0,
-                      12,
-                      82,
-                      69,
-                      77,
-                      79,
-                      86,
-                      69,
-                      68,
-                      95,
-                      78,
-                      79,
-                      68,
-                      69,
-                      // 127.0.0.1:1
-                      0,
-                      4,
-                      127,
-                      0,
-                      0,
-                      1,
-                      0,
-                      0,
-                      0,
-                      1];
+        let bytes = &[
+            // topology change
+            0, 15, 84, 79, 80, 79, 76, 79, 71, 89, 95, 67, 72, 65, 78, 71, 69,
+            // removed node
+            0, 12, 82, 69, 77, 79, 86, 69, 68, 95, 78, 79, 68, 69, // 127.0.0.1:1
+            0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
+        ];
         let mut c: Cursor<&[u8]> = Cursor::new(bytes);
         let event = ServerEvent::from_cursor(&mut c).unwrap();
         match event {
@@ -551,38 +521,12 @@ mod server_event {
 
     #[test]
     fn status_change_up() {
-        let bytes = &[// status change
-                      0,
-                      13,
-                      83,
-                      84,
-                      65,
-                      84,
-                      85,
-                      83,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // up
-                      0,
-                      2,
-                      85,
-                      80,
-                      // 127.0.0.1:1
-                      0,
-                      4,
-                      127,
-                      0,
-                      0,
-                      1,
-                      0,
-                      0,
-                      0,
-                      1];
+        let bytes = &[
+            // status change
+            0, 13, 83, 84, 65, 84, 85, 83, 95, 67, 72, 65, 78, 71, 69, // up
+            0, 2, 85, 80, // 127.0.0.1:1
+            0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
+        ];
         let mut c: Cursor<&[u8]> = Cursor::new(bytes);
         let event = ServerEvent::from_cursor(&mut c).unwrap();
         match event {
@@ -596,40 +540,12 @@ mod server_event {
 
     #[test]
     fn status_change_down() {
-        let bytes = &[// status change
-                      0,
-                      13,
-                      83,
-                      84,
-                      65,
-                      84,
-                      85,
-                      83,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // down
-                      0,
-                      4,
-                      68,
-                      79,
-                      87,
-                      78,
-                      // 127.0.0.1:1
-                      0,
-                      4,
-                      127,
-                      0,
-                      0,
-                      1,
-                      0,
-                      0,
-                      0,
-                      1];
+        let bytes = &[
+            // status change
+            0, 13, 83, 84, 65, 84, 85, 83, 95, 67, 72, 65, 78, 71, 69, // down
+            0, 4, 68, 79, 87, 78, // 127.0.0.1:1
+            0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
+        ];
         let mut c: Cursor<&[u8]> = Cursor::new(bytes);
         let event = ServerEvent::from_cursor(&mut c).unwrap();
         match event {
@@ -644,51 +560,13 @@ mod server_event {
     #[test]
     fn schema_change_created() {
         // keyspace
-        let keyspace = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // created
-                         0,
-                         7,
-                         67,
-                         82,
-                         69,
-                         65,
-                         84,
-                         69,
-                         68,
-                         // keyspace
-                         0,
-                         8,
-                         75,
-                         69,
-                         89,
-                         83,
-                         80,
-                         65,
-                         67,
-                         69,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115];
+        let keyspace = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // created
+            0, 7, 67, 82, 69, 65, 84, 69, 68, // keyspace
+            0, 8, 75, 69, 89, 83, 80, 65, 67, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115,
+        ];
         let mut ks: Cursor<&[u8]> = Cursor::new(keyspace);
         let ks_event = ServerEvent::from_cursor(&mut ks).unwrap();
         match ks_event {
@@ -703,59 +581,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // table
-        let table = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // created
-                      0,
-                      7,
-                      67,
-                      82,
-                      69,
-                      65,
-                      84,
-                      69,
-                      68,
-                      // table
-                      0,
-                      5,
-                      84,
-                      65,
-                      66,
-                      76,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let table = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // created
+            0, 7, 67, 82, 69, 65, 84, 69, 68, // table
+            0, 5, 84, 65, 66, 76, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tb: Cursor<&[u8]> = Cursor::new(table);
         let tb_event = ServerEvent::from_cursor(&mut tb).unwrap();
         match tb_event {
@@ -772,58 +605,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // type
-        let _type = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // created
-                      0,
-                      7,
-                      67,
-                      82,
-                      69,
-                      65,
-                      84,
-                      69,
-                      68,
-                      // type
-                      0,
-                      4,
-                      84,
-                      89,
-                      80,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let _type = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // created
+            0, 7, 67, 82, 69, 65, 84, 69, 68, // type
+            0, 4, 84, 89, 80, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tp: Cursor<&[u8]> = Cursor::new(_type);
         let tp_event = ServerEvent::from_cursor(&mut tp).unwrap();
         match tp_event {
@@ -840,61 +629,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let function = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // created
-                         0,
-                         7,
-                         67,
-                         82,
-                         69,
-                         65,
-                         84,
-                         69,
-                         68,
-                         // function
-                         0,
-                         8,
-                         70,
-                         85,
-                         78,
-                         67,
-                         84,
-                         73,
-                         79,
-                         78,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115,
-                         // name
-                         0,
-                         4,
-                         110,
-                         97,
-                         109,
-                         101,
-                         // empty list of parameters
-                         0,
-                         0];
+        let function = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // created
+            0, 7, 67, 82, 69, 65, 84, 69, 68, // function
+            0, 8, 70, 85, 78, 67, 84, 73, 79, 78, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut fnct: Cursor<&[u8]> = Cursor::new(function);
         let fnct_event = ServerEvent::from_cursor(&mut fnct).unwrap();
         match fnct_event {
@@ -911,62 +654,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let aggregate = &[// schema change
-                          0,
-                          13,
-                          83,
-                          67,
-                          72,
-                          69,
-                          77,
-                          65,
-                          95,
-                          67,
-                          72,
-                          65,
-                          78,
-                          71,
-                          69,
-                          // created
-                          0,
-                          7,
-                          67,
-                          82,
-                          69,
-                          65,
-                          84,
-                          69,
-                          68,
-                          // aggregate
-                          0,
-                          9,
-                          65,
-                          71,
-                          71,
-                          82,
-                          69,
-                          71,
-                          65,
-                          84,
-                          69,
-                          // my_ks
-                          0,
-                          5,
-                          109,
-                          121,
-                          95,
-                          107,
-                          115,
-                          // name
-                          0,
-                          4,
-                          110,
-                          97,
-                          109,
-                          101,
-                          // empty list of parameters
-                          0,
-                          0];
+        let aggregate = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // created
+            0, 7, 67, 82, 69, 65, 84, 69, 68, // aggregate
+            0, 9, 65, 71, 71, 82, 69, 71, 65, 84, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut aggr: Cursor<&[u8]> = Cursor::new(aggregate);
         let aggr_event = ServerEvent::from_cursor(&mut aggr).unwrap();
         match aggr_event {
@@ -987,51 +683,13 @@ mod server_event {
     #[test]
     fn schema_change_updated() {
         // keyspace
-        let keyspace = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // updated
-                         0,
-                         7,
-                         85,
-                         80,
-                         68,
-                         65,
-                         84,
-                         69,
-                         68,
-                         // keyspace
-                         0,
-                         8,
-                         75,
-                         69,
-                         89,
-                         83,
-                         80,
-                         65,
-                         67,
-                         69,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115];
+        let keyspace = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // updated
+            0, 7, 85, 80, 68, 65, 84, 69, 68, // keyspace
+            0, 8, 75, 69, 89, 83, 80, 65, 67, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115,
+        ];
         let mut ks: Cursor<&[u8]> = Cursor::new(keyspace);
         let ks_event = ServerEvent::from_cursor(&mut ks).unwrap();
         match ks_event {
@@ -1046,59 +704,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // table
-        let table = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // updated
-                      0,
-                      7,
-                      85,
-                      80,
-                      68,
-                      65,
-                      84,
-                      69,
-                      68,
-                      // table
-                      0,
-                      5,
-                      84,
-                      65,
-                      66,
-                      76,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let table = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // updated
+            0, 7, 85, 80, 68, 65, 84, 69, 68, // table
+            0, 5, 84, 65, 66, 76, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tb: Cursor<&[u8]> = Cursor::new(table);
         let tb_event = ServerEvent::from_cursor(&mut tb).unwrap();
         match tb_event {
@@ -1115,58 +728,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // type
-        let _type = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // updated
-                      0,
-                      7,
-                      85,
-                      80,
-                      68,
-                      65,
-                      84,
-                      69,
-                      68,
-                      // type
-                      0,
-                      4,
-                      84,
-                      89,
-                      80,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let _type = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // updated
+            0, 7, 85, 80, 68, 65, 84, 69, 68, // type
+            0, 4, 84, 89, 80, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tp: Cursor<&[u8]> = Cursor::new(_type);
         let tp_event = ServerEvent::from_cursor(&mut tp).unwrap();
         match tp_event {
@@ -1183,61 +752,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let function = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // updated
-                         0,
-                         7,
-                         85,
-                         80,
-                         68,
-                         65,
-                         84,
-                         69,
-                         68,
-                         // function
-                         0,
-                         8,
-                         70,
-                         85,
-                         78,
-                         67,
-                         84,
-                         73,
-                         79,
-                         78,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115,
-                         // name
-                         0,
-                         4,
-                         110,
-                         97,
-                         109,
-                         101,
-                         // empty list of parameters
-                         0,
-                         0];
+        let function = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // updated
+            0, 7, 85, 80, 68, 65, 84, 69, 68, // function
+            0, 8, 70, 85, 78, 67, 84, 73, 79, 78, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut fnct: Cursor<&[u8]> = Cursor::new(function);
         let fnct_event = ServerEvent::from_cursor(&mut fnct).unwrap();
         match fnct_event {
@@ -1254,62 +777,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let aggregate = &[// schema change
-                          0,
-                          13,
-                          83,
-                          67,
-                          72,
-                          69,
-                          77,
-                          65,
-                          95,
-                          67,
-                          72,
-                          65,
-                          78,
-                          71,
-                          69,
-                          // updated
-                          0,
-                          7,
-                          85,
-                          80,
-                          68,
-                          65,
-                          84,
-                          69,
-                          68,
-                          // aggregate
-                          0,
-                          9,
-                          65,
-                          71,
-                          71,
-                          82,
-                          69,
-                          71,
-                          65,
-                          84,
-                          69,
-                          // my_ks
-                          0,
-                          5,
-                          109,
-                          121,
-                          95,
-                          107,
-                          115,
-                          // name
-                          0,
-                          4,
-                          110,
-                          97,
-                          109,
-                          101,
-                          // empty list of parameters
-                          0,
-                          0];
+        let aggregate = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // updated
+            0, 7, 85, 80, 68, 65, 84, 69, 68, // aggregate
+            0, 9, 65, 71, 71, 82, 69, 71, 65, 84, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut aggr: Cursor<&[u8]> = Cursor::new(aggregate);
         let aggr_event = ServerEvent::from_cursor(&mut aggr).unwrap();
         match aggr_event {
@@ -1330,51 +806,13 @@ mod server_event {
     #[test]
     fn schema_change_dropped() {
         // keyspace
-        let keyspace = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // dropped
-                         0,
-                         7,
-                         68,
-                         82,
-                         79,
-                         80,
-                         80,
-                         69,
-                         68,
-                         // keyspace
-                         0,
-                         8,
-                         75,
-                         69,
-                         89,
-                         83,
-                         80,
-                         65,
-                         67,
-                         69,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115];
+        let keyspace = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // dropped
+            0, 7, 68, 82, 79, 80, 80, 69, 68, // keyspace
+            0, 8, 75, 69, 89, 83, 80, 65, 67, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115,
+        ];
         let mut ks: Cursor<&[u8]> = Cursor::new(keyspace);
         let ks_event = ServerEvent::from_cursor(&mut ks).unwrap();
         match ks_event {
@@ -1389,59 +827,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // table
-        let table = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // dropped
-                      0,
-                      7,
-                      68,
-                      82,
-                      79,
-                      80,
-                      80,
-                      69,
-                      68,
-                      // table
-                      0,
-                      5,
-                      84,
-                      65,
-                      66,
-                      76,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let table = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // dropped
+            0, 7, 68, 82, 79, 80, 80, 69, 68, // table
+            0, 5, 84, 65, 66, 76, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tb: Cursor<&[u8]> = Cursor::new(table);
         let tb_event = ServerEvent::from_cursor(&mut tb).unwrap();
         match tb_event {
@@ -1458,58 +851,14 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // type
-        let _type = &[// schema change
-                      0,
-                      13,
-                      83,
-                      67,
-                      72,
-                      69,
-                      77,
-                      65,
-                      95,
-                      67,
-                      72,
-                      65,
-                      78,
-                      71,
-                      69,
-                      // dropped
-                      0,
-                      7,
-                      68,
-                      82,
-                      79,
-                      80,
-                      80,
-                      69,
-                      68,
-                      // type
-                      0,
-                      4,
-                      84,
-                      89,
-                      80,
-                      69,
-                      // my_ks
-                      0,
-                      5,
-                      109,
-                      121,
-                      95,
-                      107,
-                      115,
-                      // my_table
-                      0,
-                      8,
-                      109,
-                      121,
-                      95,
-                      116,
-                      97,
-                      98,
-                      108,
-                      101];
+        let _type = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // dropped
+            0, 7, 68, 82, 79, 80, 80, 69, 68, // type
+            0, 4, 84, 89, 80, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // my_table
+            0, 8, 109, 121, 95, 116, 97, 98, 108, 101,
+        ];
         let mut tp: Cursor<&[u8]> = Cursor::new(_type);
         let tp_event = ServerEvent::from_cursor(&mut tp).unwrap();
         match tp_event {
@@ -1526,61 +875,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let function = &[// schema change
-                         0,
-                         13,
-                         83,
-                         67,
-                         72,
-                         69,
-                         77,
-                         65,
-                         95,
-                         67,
-                         72,
-                         65,
-                         78,
-                         71,
-                         69,
-                         // dropped
-                         0,
-                         7,
-                         68,
-                         82,
-                         79,
-                         80,
-                         80,
-                         69,
-                         68,
-                         // function
-                         0,
-                         8,
-                         70,
-                         85,
-                         78,
-                         67,
-                         84,
-                         73,
-                         79,
-                         78,
-                         // my_ks
-                         0,
-                         5,
-                         109,
-                         121,
-                         95,
-                         107,
-                         115,
-                         // name
-                         0,
-                         4,
-                         110,
-                         97,
-                         109,
-                         101,
-                         // empty list of parameters
-                         0,
-                         0];
+        let function = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // dropped
+            0, 7, 68, 82, 79, 80, 80, 69, 68, // function
+            0, 8, 70, 85, 78, 67, 84, 73, 79, 78, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut fnct: Cursor<&[u8]> = Cursor::new(function);
         let fnct_event = ServerEvent::from_cursor(&mut fnct).unwrap();
         match fnct_event {
@@ -1597,62 +900,15 @@ mod server_event {
             _ => panic!("should be schema change"),
         }
         // function
-        let aggregate = &[// schema change
-                          0,
-                          13,
-                          83,
-                          67,
-                          72,
-                          69,
-                          77,
-                          65,
-                          95,
-                          67,
-                          72,
-                          65,
-                          78,
-                          71,
-                          69,
-                          // dropped
-                          0,
-                          7,
-                          68,
-                          82,
-                          79,
-                          80,
-                          80,
-                          69,
-                          68,
-                          // aggregate
-                          0,
-                          9,
-                          65,
-                          71,
-                          71,
-                          82,
-                          69,
-                          71,
-                          65,
-                          84,
-                          69,
-                          // my_ks
-                          0,
-                          5,
-                          109,
-                          121,
-                          95,
-                          107,
-                          115,
-                          // name
-                          0,
-                          4,
-                          110,
-                          97,
-                          109,
-                          101,
-                          // empty list of parameters
-                          0,
-                          0];
+        let aggregate = &[
+            // schema change
+            0, 13, 83, 67, 72, 69, 77, 65, 95, 67, 72, 65, 78, 71, 69, // dropped
+            0, 7, 68, 82, 79, 80, 80, 69, 68, // aggregate
+            0, 9, 65, 71, 71, 82, 69, 71, 65, 84, 69, // my_ks
+            0, 5, 109, 121, 95, 107, 115, // name
+            0, 4, 110, 97, 109, 101, // empty list of parameters
+            0, 0,
+        ];
         let mut aggr: Cursor<&[u8]> = Cursor::new(aggregate);
         let aggr_event = ServerEvent::from_cursor(&mut aggr).unwrap();
         match aggr_event {
diff --git a/src/frame/frame_auth_challenge.rs b/src/frame/frame_auth_challenge.rs
index 089a3fb..e45d969 100644
--- a/src/frame/frame_auth_challenge.rs
+++ b/src/frame/frame_auth_challenge.rs
@@ -1,7 +1,7 @@
 use std::io::Cursor;
 
-use crate::frame::FromCursor;
 use crate::error;
+use crate::frame::FromCursor;
 use crate::types::CBytes;
 
 /// Server authentication challenge.
@@ -18,16 +18,18 @@ impl FromCursor for BodyResAuthChallenge {
 
 #[cfg(test)]
 mod tests {
-    use std::io::Cursor;
     use super::*;
     use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
     #[test]
     fn body_res_auth_challenge_from_cursor() {
         let few_bytes = &[0, 0, 0, 10, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
         let mut cursor: Cursor<&[u8]> = Cursor::new(few_bytes);
         let body = BodyResAuthChallenge::from_cursor(&mut cursor).unwrap();
-        assert_eq!(body.data.into_plain().unwrap(),
-                   vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
+        assert_eq!(
+            body.data.into_plain().unwrap(),
+            vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
+        );
     }
 }
diff --git a/src/frame/frame_auth_response.rs b/src/frame/frame_auth_response.rs
index 7894f78..b485241 100644
--- a/src/frame/frame_auth_response.rs
+++ b/src/frame/frame_auth_response.rs
@@ -5,68 +5,68 @@ use crate::types::CBytes;
 
 #[derive(Debug)]
 pub struct BodyReqAuthResponse {
-  data: CBytes,
+    data: CBytes,
 }
 
 impl BodyReqAuthResponse {
-  pub fn new(data: CBytes) -> BodyReqAuthResponse {
-    BodyReqAuthResponse { data: data }
-  }
+    pub fn new(data: CBytes) -> BodyReqAuthResponse {
+        BodyReqAuthResponse { data: data }
+    }
 }
 
 impl IntoBytes for BodyReqAuthResponse {
-  fn into_cbytes(&self) -> Vec<u8> {
-    self.data.into_cbytes()
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        self.data.into_cbytes()
+    }
 }
 
 // Frame implementation related to BodyReqStartup
 
 impl Frame {
-  /// Creates new frame of type `AuthResponse`.
-  pub fn new_req_auth_response(bytes: Vec<u8>) -> Frame {
-    let version = Version::Request;
-    let flag = Flag::Ignore;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::AuthResponse;
-    let body = BodyReqAuthResponse::new(CBytes::new(bytes));
+    /// Creates new frame of type `AuthResponse`.
+    pub fn new_req_auth_response(bytes: Vec<u8>) -> Frame {
+        let version = Version::Request;
+        let flag = Flag::Ignore;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::AuthResponse;
+        let body = BodyReqAuthResponse::new(CBytes::new(bytes));
 
-    Frame {
-      version: version,
-      flags: vec![flag],
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: vec![flag],
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::IntoBytes;
-  use crate::types::CBytes;
+    use super::*;
+    use crate::frame::traits::IntoBytes;
+    use crate::types::CBytes;
 
-  #[test]
-  fn body_req_auth_response() {
-    let bytes = CBytes::new(vec![1, 2, 3]);
-    let body = BodyReqAuthResponse::new(bytes);
-    assert_eq!(body.into_cbytes(), vec![0, 0, 0, 3, 1, 2, 3]);
-  }
+    #[test]
+    fn body_req_auth_response() {
+        let bytes = CBytes::new(vec![1, 2, 3]);
+        let body = BodyReqAuthResponse::new(bytes);
+        assert_eq!(body.into_cbytes(), vec![0, 0, 0, 3, 1, 2, 3]);
+    }
 
-  #[test]
-  fn frame_body_req_auth_response() {
-    let bytes = vec![1, 2, 3];
-    let frame = Frame::new_req_auth_response(bytes);
+    #[test]
+    fn frame_body_req_auth_response() {
+        let bytes = vec![1, 2, 3];
+        let frame = Frame::new_req_auth_response(bytes);
 
-    assert_eq!(frame.version, Version::Request);
-    assert_eq!(frame.flags, vec![Flag::Ignore]);
-    assert_eq!(frame.opcode, Opcode::AuthResponse);
-    assert_eq!(frame.body, &[0, 0, 0, 3, 1, 2, 3]);
-    assert_eq!(frame.tracing_id, None);
-    assert_eq!(frame.warnings.len(), 0);
-  }
+        assert_eq!(frame.version, Version::Request);
+        assert_eq!(frame.flags, vec![Flag::Ignore]);
+        assert_eq!(frame.opcode, Opcode::AuthResponse);
+        assert_eq!(frame.body, &[0, 0, 0, 3, 1, 2, 3]);
+        assert_eq!(frame.tracing_id, None);
+        assert_eq!(frame.warnings.len(), 0);
+    }
 }
diff --git a/src/frame/frame_auth_success.rs b/src/frame/frame_auth_success.rs
index 4639f88..8b318cd 100644
--- a/src/frame/frame_auth_success.rs
+++ b/src/frame/frame_auth_success.rs
@@ -8,22 +8,22 @@ use crate::frame::FromCursor;
 pub struct BodyReqAuthSuccess {}
 
 impl FromCursor for BodyReqAuthSuccess {
-  fn from_cursor(mut _cursor: &mut Cursor<&[u8]>) -> error::Result<BodyReqAuthSuccess> {
-    Ok(BodyReqAuthSuccess {})
-  }
+    fn from_cursor(mut _cursor: &mut Cursor<&[u8]>) -> error::Result<BodyReqAuthSuccess> {
+        Ok(BodyReqAuthSuccess {})
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::FromCursor;
-  use std::io::Cursor;
+    use super::*;
+    use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
-  #[test]
-  fn test_name() {
-    let rnd_bytes = [4, 5, 3, 8, 4, 6, 5, 0, 3, 7, 2];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(&rnd_bytes);
-    let body = BodyReqAuthSuccess::from_cursor(&mut cursor).unwrap();
-    assert_eq!(body, BodyReqAuthSuccess {});
-  }
+    #[test]
+    fn test_name() {
+        let rnd_bytes = [4, 5, 3, 8, 4, 6, 5, 0, 3, 7, 2];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(&rnd_bytes);
+        let body = BodyReqAuthSuccess::from_cursor(&mut cursor).unwrap();
+        assert_eq!(body, BodyReqAuthSuccess {});
+    }
 }
diff --git a/src/frame/frame_authenticate.rs b/src/frame/frame_authenticate.rs
index 4fc834c..14ca56d 100644
--- a/src/frame/frame_authenticate.rs
+++ b/src/frame/frame_authenticate.rs
@@ -7,29 +7,29 @@ use crate::types::CString;
 /// A server authentication challenge.
 #[derive(Debug)]
 pub struct BodyResAuthenticate {
-  pub data: CString,
+    pub data: CString,
 }
 
 impl FromCursor for BodyResAuthenticate {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResAuthenticate> {
-    Ok(BodyResAuthenticate {
-      data: CString::from_cursor(&mut cursor)?,
-    })
-  }
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResAuthenticate> {
+        Ok(BodyResAuthenticate {
+            data: CString::from_cursor(&mut cursor)?,
+        })
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::FromCursor;
-  use std::io::Cursor;
+    use super::*;
+    use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
-  #[test]
-  fn body_res_authenticate() {
-    // string "abcde"
-    let data = [0, 5, 97, 98, 99, 100, 101];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(&data);
-    let body = BodyResAuthenticate::from_cursor(&mut cursor).unwrap();
-    assert_eq!(body.data.as_str(), "abcde");
-  }
+    #[test]
+    fn body_res_authenticate() {
+        // string "abcde"
+        let data = [0, 5, 97, 98, 99, 100, 101];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(&data);
+        let body = BodyResAuthenticate::from_cursor(&mut cursor).unwrap();
+        assert_eq!(body.data.as_str(), "abcde");
+    }
 }
diff --git a/src/frame/frame_batch.rs b/src/frame/frame_batch.rs
index 1bedbd2..a2656a4 100644
--- a/src/frame/frame_batch.rs
+++ b/src/frame/frame_batch.rs
@@ -9,152 +9,152 @@ use crate::types::*;
 /// `BodyResReady`
 #[derive(Debug, Clone)]
 pub struct BodyReqBatch {
-  pub batch_type: BatchType,
-  pub queries: Vec<BatchQuery>,
-  pub consistency: Consistency,
-  /// **IMPORTANT NOTE:** with names flag does not work and should not be used.
-  /// https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L413
-  pub query_flags: Vec<QueryFlags>,
-  pub serial_consistency: Option<Consistency>,
-  pub timestamp: Option<i64>,
+    pub batch_type: BatchType,
+    pub queries: Vec<BatchQuery>,
+    pub consistency: Consistency,
+    /// **IMPORTANT NOTE:** with names flag does not work and should not be used.
+    /// https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L413
+    pub query_flags: Vec<QueryFlags>,
+    pub serial_consistency: Option<Consistency>,
+    pub timestamp: Option<i64>,
 }
 
 impl IntoBytes for BodyReqBatch {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut bytes = vec![];
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut bytes = vec![];
 
-    bytes.push(self.batch_type.as_byte());
+        bytes.push(self.batch_type.as_byte());
 
-    bytes.extend_from_slice(to_short(self.queries.len() as i16).as_slice());
+        bytes.extend_from_slice(to_short(self.queries.len() as i16).as_slice());
 
-    bytes = self.queries.iter().fold(bytes, |mut _bytes, q| {
-      _bytes.extend_from_slice(q.into_cbytes().as_slice());
-      _bytes
-    });
+        bytes = self.queries.iter().fold(bytes, |mut _bytes, q| {
+            _bytes.extend_from_slice(q.into_cbytes().as_slice());
+            _bytes
+        });
 
-    bytes.extend_from_slice(self.consistency.into_cbytes().as_slice());
+        bytes.extend_from_slice(self.consistency.into_cbytes().as_slice());
 
-    let flag_byte = self
-      .query_flags
-      .iter()
-      .fold(0, |mut _bytes, f| _bytes | f.as_byte());
-    bytes.push(flag_byte);
+        let flag_byte = self
+            .query_flags
+            .iter()
+            .fold(0, |mut _bytes, f| _bytes | f.as_byte());
+        bytes.push(flag_byte);
 
-    if let Some(ref serial_consistency) = self.serial_consistency {
-      bytes.extend_from_slice(serial_consistency.into_cbytes().as_slice());
-    }
+        if let Some(ref serial_consistency) = self.serial_consistency {
+            bytes.extend_from_slice(serial_consistency.into_cbytes().as_slice());
+        }
 
-    if let Some(ref timestamp) = self.timestamp {
-      //bytes.extend_from_slice(to_bigint(timestamp.clone()).as_slice());
-      bytes.extend_from_slice(to_bigint(*timestamp).as_slice());
-    }
+        if let Some(ref timestamp) = self.timestamp {
+            //bytes.extend_from_slice(to_bigint(timestamp.clone()).as_slice());
+            bytes.extend_from_slice(to_bigint(*timestamp).as_slice());
+        }
 
-    bytes
-  }
+        bytes
+    }
 }
 
 /// Batch type
 #[derive(Debug, Clone, PartialEq)]
 pub enum BatchType {
-  /// The batch will be "logged". This is equivalent to a
-  /// normal CQL3 batch statement.
-  Logged,
-  /// The batch will be "unlogged".
-  Unlogged,
-  /// The batch will be a "counter" batch (and non-counter
-  /// statements will be rejected).
-  Counter,
+    /// The batch will be "logged". This is equivalent to a
+    /// normal CQL3 batch statement.
+    Logged,
+    /// The batch will be "unlogged".
+    Unlogged,
+    /// The batch will be a "counter" batch (and non-counter
+    /// statements will be rejected).
+    Counter,
 }
 
 impl FromSingleByte for BatchType {
-  fn from_byte(byte: u8) -> BatchType {
-    match byte {
-      0 => BatchType::Logged,
-      1 => BatchType::Unlogged,
-      2 => BatchType::Counter,
-      _ => unreachable!(),
+    fn from_byte(byte: u8) -> BatchType {
+        match byte {
+            0 => BatchType::Logged,
+            1 => BatchType::Unlogged,
+            2 => BatchType::Counter,
+            _ => unreachable!(),
+        }
     }
-  }
 }
 
 impl AsByte for BatchType {
-  fn as_byte(&self) -> u8 {
-    match *self {
-      BatchType::Logged => 0,
-      BatchType::Unlogged => 1,
-      BatchType::Counter => 2,
+    fn as_byte(&self) -> u8 {
+        match *self {
+            BatchType::Logged => 0,
+            BatchType::Unlogged => 1,
+            BatchType::Counter => 2,
+        }
     }
-  }
 }
 
 /// The structure that represents a query to be batched.
 #[derive(Debug, Clone)]
 pub struct BatchQuery {
-  /// It indicates if a query was prepared.
-  pub is_prepared: bool,
-  /// It contains either id of prepared query of a query itself.
-  pub subject: BatchQuerySubj,
-  /// It is the optional name of the following <value_i>. It must be present
-  /// if and only if the 0x40 flag is provided for the batch.
-  /// **Important note:** this feature does not work and should not be
-  /// used. It is specified in a way that makes it impossible for the server
-  /// to implement. This will be fixed in a future version of the native
-  /// protocol. See https://issues.apache.org/jira/browse/CASSANDRA-10246 for
-  /// more details
-  pub values: QueryValues,
+    /// It indicates if a query was prepared.
+    pub is_prepared: bool,
+    /// It contains either id of prepared query of a query itself.
+    pub subject: BatchQuerySubj,
+    /// It is the optional name of the following <value_i>. It must be present
+    /// if and only if the 0x40 flag is provided for the batch.
+    /// **Important note:** this feature does not work and should not be
+    /// used. It is specified in a way that makes it impossible for the server
+    /// to implement. This will be fixed in a future version of the native
+    /// protocol. See https://issues.apache.org/jira/browse/CASSANDRA-10246 for
+    /// more details
+    pub values: QueryValues,
 }
 
 /// It contains either an id of prepared query or CQL string.
 #[derive(Debug, Clone)]
 pub enum BatchQuerySubj {
-  PreparedId(CBytesShort),
-  QueryString(CStringLong),
+    PreparedId(CBytesShort),
+    QueryString(CStringLong),
 }
 
 impl IntoBytes for BatchQuery {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut bytes = vec![];
-
-    // kind
-    if self.is_prepared {
-      bytes.push(1);
-    } else {
-      bytes.push(0);
-    }
-
-    match self.subject {
-      BatchQuerySubj::PreparedId(ref s) => {
-        bytes.extend_from_slice(s.into_cbytes().as_slice());
-      }
-      BatchQuerySubj::QueryString(ref s) => {
-        bytes.extend_from_slice(s.into_cbytes().as_slice());
-      }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut bytes = vec![];
+
+        // kind
+        if self.is_prepared {
+            bytes.push(1);
+        } else {
+            bytes.push(0);
+        }
+
+        match self.subject {
+            BatchQuerySubj::PreparedId(ref s) => {
+                bytes.extend_from_slice(s.into_cbytes().as_slice());
+            }
+            BatchQuerySubj::QueryString(ref s) => {
+                bytes.extend_from_slice(s.into_cbytes().as_slice());
+            }
+        }
+
+        bytes.extend_from_slice(to_short(self.values.len() as i16).as_slice());
+
+        bytes.extend_from_slice(self.values.into_cbytes().as_slice());
+
+        bytes
     }
-
-    bytes.extend_from_slice(to_short(self.values.len() as i16).as_slice());
-
-    bytes.extend_from_slice(self.values.into_cbytes().as_slice());
-
-    bytes
-  }
 }
 
 impl Frame {
-  /// **Note:** This function should be used internally for building query request frames.
-  pub fn new_req_batch(query: BodyReqBatch, flags: Vec<Flag>) -> Frame {
-    let version = Version::Request;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Batch;
-
-    Frame {
-      version: version,
-      flags: flags,
-      stream: stream,
-      opcode: opcode,
-      body: query.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+    /// **Note:** This function should be used internally for building query request frames.
+    pub fn new_req_batch(query: BodyReqBatch, flags: Vec<Flag>) -> Frame {
+        let version = Version::Request;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Batch;
+
+        Frame {
+            version: version,
+            flags: flags,
+            stream: stream,
+            opcode: opcode,
+            body: query.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
diff --git a/src/frame/frame_error.rs b/src/frame/frame_error.rs
index a2ecffc..a6a3d3f 100644
--- a/src/frame/frame_error.rs
+++ b/src/frame/frame_error.rs
@@ -22,26 +22,26 @@ pub type Result = result::Result<Frame, CDRSError>;
 /// This additional information is represented by `additional_info` property which is `ErrorKind`.
 #[derive(Debug)]
 pub struct CDRSError {
-  /// `i32` that points to a type of error.
-  pub error_code: CInt,
-  /// Error message string.
-  pub message: CString,
-  /// Additional information.
-  pub additional_info: AdditionalErrorInfo,
+    /// `i32` that points to a type of error.
+    pub error_code: CInt,
+    /// Error message string.
+    pub message: CString,
+    /// Additional information.
+    pub additional_info: AdditionalErrorInfo,
 }
 
 impl FromCursor for CDRSError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<CDRSError> {
-    let error_code = CInt::from_cursor(&mut cursor)?;
-    let message = CString::from_cursor(&mut cursor)?;
-    let additional_info = AdditionalErrorInfo::from_cursor_with_code(&mut cursor, error_code)?;
-
-    Ok(CDRSError {
-      error_code: error_code,
-      message: message,
-      additional_info: additional_info,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<CDRSError> {
+        let error_code = CInt::from_cursor(&mut cursor)?;
+        let message = CString::from_cursor(&mut cursor)?;
+        let additional_info = AdditionalErrorInfo::from_cursor_with_code(&mut cursor, error_code)?;
+
+        Ok(CDRSError {
+            error_code: error_code,
+            message: message,
+            additional_info: additional_info,
+        })
+    }
 }
 
 /// Additional error info in accordance to
@@ -49,89 +49,89 @@ impl FromCursor for CDRSError {
 /// (https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1011).
 #[derive(Debug)]
 pub enum AdditionalErrorInfo {
-  Server(SimpleError),
-  Protocol(SimpleError),
-  Authentication(SimpleError),
-  Unavailable(UnavailableError),
-  Overloaded(SimpleError),
-  IsBootstrapping(SimpleError),
-  Truncate(SimpleError),
-  WriteTimeout(WriteTimeoutError),
-  ReadTimeout(ReadTimeoutError),
-  ReadFailure(ReadFailureError),
-  FunctionFailure(FunctionFailureError),
-  WriteFailure(WriteFailureError),
-  Syntax(SimpleError),
-  Unauthorized(SimpleError),
-  Invalid(SimpleError),
-  Config(SimpleError),
-  AlreadyExists(AlreadyExistsError),
-  Unprepared(UnpreparedError),
+    Server(SimpleError),
+    Protocol(SimpleError),
+    Authentication(SimpleError),
+    Unavailable(UnavailableError),
+    Overloaded(SimpleError),
+    IsBootstrapping(SimpleError),
+    Truncate(SimpleError),
+    WriteTimeout(WriteTimeoutError),
+    ReadTimeout(ReadTimeoutError),
+    ReadFailure(ReadFailureError),
+    FunctionFailure(FunctionFailureError),
+    WriteFailure(WriteFailureError),
+    Syntax(SimpleError),
+    Unauthorized(SimpleError),
+    Invalid(SimpleError),
+    Config(SimpleError),
+    AlreadyExists(AlreadyExistsError),
+    Unprepared(UnpreparedError),
 }
 
 impl AdditionalErrorInfo {
-  pub fn from_cursor_with_code(
-    mut cursor: &mut io::Cursor<&[u8]>,
-    error_code: CInt,
-  ) -> error::Result<AdditionalErrorInfo> {
-    match error_code {
-      0x0000 => Ok(AdditionalErrorInfo::Server(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x000A => Ok(AdditionalErrorInfo::Protocol(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x0100 => Ok(AdditionalErrorInfo::Authentication(
-        SimpleError::from_cursor(&mut cursor)?,
-      )),
-      0x1000 => Ok(AdditionalErrorInfo::Unavailable(
-        UnavailableError::from_cursor(&mut cursor)?,
-      )),
-      0x1001 => Ok(AdditionalErrorInfo::Overloaded(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x1002 => Ok(AdditionalErrorInfo::IsBootstrapping(
-        SimpleError::from_cursor(&mut cursor)?,
-      )),
-      0x1003 => Ok(AdditionalErrorInfo::Truncate(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x1100 => Ok(AdditionalErrorInfo::WriteTimeout(
-        WriteTimeoutError::from_cursor(&mut cursor)?,
-      )),
-      0x1200 => Ok(AdditionalErrorInfo::ReadTimeout(
-        ReadTimeoutError::from_cursor(&mut cursor)?,
-      )),
-      0x1300 => Ok(AdditionalErrorInfo::ReadFailure(
-        ReadFailureError::from_cursor(&mut cursor)?,
-      )),
-      0x1400 => Ok(AdditionalErrorInfo::FunctionFailure(
-        FunctionFailureError::from_cursor(&mut cursor)?,
-      )),
-      0x1500 => Ok(AdditionalErrorInfo::WriteFailure(
-        WriteFailureError::from_cursor(&mut cursor)?,
-      )),
-      0x2000 => Ok(AdditionalErrorInfo::Syntax(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x2100 => Ok(AdditionalErrorInfo::Unauthorized(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x2200 => Ok(AdditionalErrorInfo::Invalid(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x2300 => Ok(AdditionalErrorInfo::Config(SimpleError::from_cursor(
-        &mut cursor,
-      )?)),
-      0x2400 => Ok(AdditionalErrorInfo::AlreadyExists(
-        AlreadyExistsError::from_cursor(&mut cursor)?,
-      )),
-      0x2500 => Ok(AdditionalErrorInfo::Unprepared(
-        UnpreparedError::from_cursor(&mut cursor)?,
-      )),
-      _ => Err("Unexpected additional error info".into()),
+    pub fn from_cursor_with_code(
+        mut cursor: &mut io::Cursor<&[u8]>,
+        error_code: CInt,
+    ) -> error::Result<AdditionalErrorInfo> {
+        match error_code {
+            0x0000 => Ok(AdditionalErrorInfo::Server(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x000A => Ok(AdditionalErrorInfo::Protocol(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x0100 => Ok(AdditionalErrorInfo::Authentication(
+                SimpleError::from_cursor(&mut cursor)?,
+            )),
+            0x1000 => Ok(AdditionalErrorInfo::Unavailable(
+                UnavailableError::from_cursor(&mut cursor)?,
+            )),
+            0x1001 => Ok(AdditionalErrorInfo::Overloaded(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x1002 => Ok(AdditionalErrorInfo::IsBootstrapping(
+                SimpleError::from_cursor(&mut cursor)?,
+            )),
+            0x1003 => Ok(AdditionalErrorInfo::Truncate(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x1100 => Ok(AdditionalErrorInfo::WriteTimeout(
+                WriteTimeoutError::from_cursor(&mut cursor)?,
+            )),
+            0x1200 => Ok(AdditionalErrorInfo::ReadTimeout(
+                ReadTimeoutError::from_cursor(&mut cursor)?,
+            )),
+            0x1300 => Ok(AdditionalErrorInfo::ReadFailure(
+                ReadFailureError::from_cursor(&mut cursor)?,
+            )),
+            0x1400 => Ok(AdditionalErrorInfo::FunctionFailure(
+                FunctionFailureError::from_cursor(&mut cursor)?,
+            )),
+            0x1500 => Ok(AdditionalErrorInfo::WriteFailure(
+                WriteFailureError::from_cursor(&mut cursor)?,
+            )),
+            0x2000 => Ok(AdditionalErrorInfo::Syntax(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x2100 => Ok(AdditionalErrorInfo::Unauthorized(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x2200 => Ok(AdditionalErrorInfo::Invalid(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x2300 => Ok(AdditionalErrorInfo::Config(SimpleError::from_cursor(
+                &mut cursor,
+            )?)),
+            0x2400 => Ok(AdditionalErrorInfo::AlreadyExists(
+                AlreadyExistsError::from_cursor(&mut cursor)?,
+            )),
+            0x2500 => Ok(AdditionalErrorInfo::Unprepared(
+                UnpreparedError::from_cursor(&mut cursor)?,
+            )),
+            _ => Err("Unexpected additional error info".into()),
+        }
     }
-  }
 }
 
 /// Is used if error does not contain any additional info.
@@ -139,9 +139,9 @@ impl AdditionalErrorInfo {
 pub struct SimpleError {}
 
 impl FromCursor for SimpleError {
-  fn from_cursor(mut _cursor: &mut io::Cursor<&[u8]>) -> error::Result<SimpleError> {
-    Ok(SimpleError {})
-  }
+    fn from_cursor(mut _cursor: &mut io::Cursor<&[u8]>) -> error::Result<SimpleError> {
+        Ok(SimpleError {})
+    }
 }
 
 /// Additional info about
@@ -149,243 +149,243 @@ impl FromCursor for SimpleError {
 /// (https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1025)
 #[derive(Debug)]
 pub struct UnavailableError {
-  /// Consistency level of query.
-  pub cl: Consistency,
-  /// Number of nodes that should be available to respect `cl`.
-  pub required: CInt,
-  /// Number of replicas that we were know to be alive.
-  pub alive: CInt,
+    /// Consistency level of query.
+    pub cl: Consistency,
+    /// Number of nodes that should be available to respect `cl`.
+    pub required: CInt,
+    /// Number of replicas that we were know to be alive.
+    pub alive: CInt,
 }
 
 impl FromCursor for UnavailableError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<UnavailableError> {
-    let cl = Consistency::from_cursor(&mut cursor)?;
-    let required = CInt::from_cursor(&mut cursor)?;
-    let alive = CInt::from_cursor(&mut cursor)?;
-
-    Ok(UnavailableError {
-      cl: cl,
-      required: required,
-      alive: alive,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<UnavailableError> {
+        let cl = Consistency::from_cursor(&mut cursor)?;
+        let required = CInt::from_cursor(&mut cursor)?;
+        let alive = CInt::from_cursor(&mut cursor)?;
+
+        Ok(UnavailableError {
+            cl: cl,
+            required: required,
+            alive: alive,
+        })
+    }
 }
 
 /// Timeout exception during a write request.
 #[derive(Debug)]
 pub struct WriteTimeoutError {
-  /// Consistency level of query.
-  pub cl: Consistency,
-  /// `i32` representing the number of nodes having acknowledged the request.
-  pub received: CInt,
-  /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
-  pub blockfor: CInt,
-  /// Describes the type of the write that timed out
-  pub write_type: WriteType,
+    /// Consistency level of query.
+    pub cl: Consistency,
+    /// `i32` representing the number of nodes having acknowledged the request.
+    pub received: CInt,
+    /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
+    pub blockfor: CInt,
+    /// Describes the type of the write that timed out
+    pub write_type: WriteType,
 }
 
 impl FromCursor for WriteTimeoutError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteTimeoutError> {
-    let cl = Consistency::from_cursor(&mut cursor)?;
-    let received = CInt::from_cursor(&mut cursor)?;
-    let blockfor = CInt::from_cursor(&mut cursor)?;
-    let write_type = WriteType::from_cursor(&mut cursor)?;
-
-    Ok(WriteTimeoutError {
-      cl: cl,
-      received: received,
-      blockfor: blockfor,
-      write_type: write_type,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteTimeoutError> {
+        let cl = Consistency::from_cursor(&mut cursor)?;
+        let received = CInt::from_cursor(&mut cursor)?;
+        let blockfor = CInt::from_cursor(&mut cursor)?;
+        let write_type = WriteType::from_cursor(&mut cursor)?;
+
+        Ok(WriteTimeoutError {
+            cl: cl,
+            received: received,
+            blockfor: blockfor,
+            write_type: write_type,
+        })
+    }
 }
 
 /// Timeout exception during a read request.
 #[derive(Debug)]
 pub struct ReadTimeoutError {
-  /// Consistency level of query.
-  pub cl: Consistency,
-  /// `i32` representing the number of nodes having acknowledged the request.
-  pub received: CInt,
-  /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
-  pub blockfor: CInt,
-  data_present: u8,
+    /// Consistency level of query.
+    pub cl: Consistency,
+    /// `i32` representing the number of nodes having acknowledged the request.
+    pub received: CInt,
+    /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
+    pub blockfor: CInt,
+    data_present: u8,
 }
 
 impl ReadTimeoutError {
-  /// Shows if replica has resonded to a query.
-  pub fn replica_has_responded(&self) -> bool {
-    self.data_present != 0
-  }
+    /// Shows if replica has resonded to a query.
+    pub fn replica_has_responded(&self) -> bool {
+        self.data_present != 0
+    }
 }
 
 impl FromCursor for ReadTimeoutError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<ReadTimeoutError> {
-    let cl = Consistency::from_cursor(&mut cursor)?;
-    let received = CInt::from_cursor(&mut cursor)?;
-    let blockfor = CInt::from_cursor(&mut cursor)?;
-    let data_present = try_from_bytes(cursor_next_value(&mut cursor, 1)?.as_slice())? as u8;
-
-    Ok(ReadTimeoutError {
-      cl: cl,
-      received: received,
-      blockfor: blockfor,
-      data_present: data_present,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<ReadTimeoutError> {
+        let cl = Consistency::from_cursor(&mut cursor)?;
+        let received = CInt::from_cursor(&mut cursor)?;
+        let blockfor = CInt::from_cursor(&mut cursor)?;
+        let data_present = try_from_bytes(cursor_next_value(&mut cursor, 1)?.as_slice())? as u8;
+
+        Ok(ReadTimeoutError {
+            cl: cl,
+            received: received,
+            blockfor: blockfor,
+            data_present: data_present,
+        })
+    }
 }
 
 /// A non-timeout exception during a read request.
 #[derive(Debug)]
 pub struct ReadFailureError {
-  /// Consistency level of query.
-  pub cl: Consistency,
-  /// `i32` representing the number of nodes having acknowledged the request.
-  pub received: CInt,
-  /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
-  pub blockfor: CInt,
-  /// Represents the number of nodes that experience a failure while executing the request.
-  pub num_failures: CInt,
-  data_present: u8,
+    /// Consistency level of query.
+    pub cl: Consistency,
+    /// `i32` representing the number of nodes having acknowledged the request.
+    pub received: CInt,
+    /// `i32` representing the number of replicas whose acknowledgement is required to achieve `cl`.
+    pub blockfor: CInt,
+    /// Represents the number of nodes that experience a failure while executing the request.
+    pub num_failures: CInt,
+    data_present: u8,
 }
 
 impl ReadFailureError {
-  /// Shows if replica has resonded to a query.
-  pub fn replica_has_responded(&self) -> bool {
-    self.data_present != 0
-  }
+    /// Shows if replica has resonded to a query.
+    pub fn replica_has_responded(&self) -> bool {
+        self.data_present != 0
+    }
 }
 
 impl FromCursor for ReadFailureError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<ReadFailureError> {
-    let cl = Consistency::from_cursor(&mut cursor)?;
-    let received = CInt::from_cursor(&mut cursor)?;
-    let blockfor = CInt::from_cursor(&mut cursor)?;
-    let num_failures = CInt::from_cursor(&mut cursor)?;
-    let data_present = try_from_bytes(cursor_next_value(&mut cursor, 1)?.as_slice())? as u8;
-
-    Ok(ReadFailureError {
-      cl: cl,
-      received: received,
-      blockfor: blockfor,
-      num_failures: num_failures,
-      data_present: data_present,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<ReadFailureError> {
+        let cl = Consistency::from_cursor(&mut cursor)?;
+        let received = CInt::from_cursor(&mut cursor)?;
+        let blockfor = CInt::from_cursor(&mut cursor)?;
+        let num_failures = CInt::from_cursor(&mut cursor)?;
+        let data_present = try_from_bytes(cursor_next_value(&mut cursor, 1)?.as_slice())? as u8;
+
+        Ok(ReadFailureError {
+            cl: cl,
+            received: received,
+            blockfor: blockfor,
+            num_failures: num_failures,
+            data_present: data_present,
+        })
+    }
 }
 
 /// A (user defined) function failed during execution.
 #[derive(Debug)]
 pub struct FunctionFailureError {
-  /// The keyspace of the failed function.
-  pub keyspace: CString,
-  /// The name of the failed function
-  pub function: CString,
-  /// `Vec<CString>` one string for each argument type (as CQL type) of the failed function.
-  pub arg_types: CStringList,
+    /// The keyspace of the failed function.
+    pub keyspace: CString,
+    /// The name of the failed function
+    pub function: CString,
+    /// `Vec<CString>` one string for each argument type (as CQL type) of the failed function.
+    pub arg_types: CStringList,
 }
 
 impl FromCursor for FunctionFailureError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<FunctionFailureError> {
-    let keyspace = CString::from_cursor(&mut cursor)?;
-    let function = CString::from_cursor(&mut cursor)?;
-    let arg_types = CStringList::from_cursor(&mut cursor)?;
-
-    Ok(FunctionFailureError {
-      keyspace: keyspace,
-      function: function,
-      arg_types: arg_types,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<FunctionFailureError> {
+        let keyspace = CString::from_cursor(&mut cursor)?;
+        let function = CString::from_cursor(&mut cursor)?;
+        let arg_types = CStringList::from_cursor(&mut cursor)?;
+
+        Ok(FunctionFailureError {
+            keyspace: keyspace,
+            function: function,
+            arg_types: arg_types,
+        })
+    }
 }
 
 /// A non-timeout exception during a write request.
 /// [Read more...](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1106)
 #[derive(Debug)]
 pub struct WriteFailureError {
-  /// Consistency of the query having triggered the exception.
-  pub cl: Consistency,
-  /// Represents the number of nodes having answered the request.
-  pub received: CInt,
-  /// Represents the number of replicas whose acknowledgement is required to achieve `cl`.
-  pub blockfor: CInt,
-  /// Represents the number of nodes that experience a failure while executing the request.
-  pub num_failures: CInt,
-  /// describes the type of the write that failed.
-  pub write_type: WriteType,
+    /// Consistency of the query having triggered the exception.
+    pub cl: Consistency,
+    /// Represents the number of nodes having answered the request.
+    pub received: CInt,
+    /// Represents the number of replicas whose acknowledgement is required to achieve `cl`.
+    pub blockfor: CInt,
+    /// Represents the number of nodes that experience a failure while executing the request.
+    pub num_failures: CInt,
+    /// describes the type of the write that failed.
+    pub write_type: WriteType,
 }
 
 impl FromCursor for WriteFailureError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteFailureError> {
-    let cl = Consistency::from_cursor(&mut cursor)?;
-    let received = CInt::from_cursor(&mut cursor)?;
-    let blockfor = CInt::from_cursor(&mut cursor)?;
-    let num_failures = CInt::from_cursor(&mut cursor)?;
-    let write_type = WriteType::from_cursor(&mut cursor)?;
-
-    Ok(WriteFailureError {
-      cl: cl,
-      received: received,
-      blockfor: blockfor,
-      num_failures: num_failures,
-      write_type: write_type,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteFailureError> {
+        let cl = Consistency::from_cursor(&mut cursor)?;
+        let received = CInt::from_cursor(&mut cursor)?;
+        let blockfor = CInt::from_cursor(&mut cursor)?;
+        let num_failures = CInt::from_cursor(&mut cursor)?;
+        let write_type = WriteType::from_cursor(&mut cursor)?;
+
+        Ok(WriteFailureError {
+            cl: cl,
+            received: received,
+            blockfor: blockfor,
+            num_failures: num_failures,
+            write_type: write_type,
+        })
+    }
 }
 
 /// Describes the type of the write that failed.
 /// [Read more...](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1118)
 #[derive(Debug)]
 pub enum WriteType {
-  /// The write was a non-batched non-counter write
-  Simple,
-  /// The write was a (logged) batch write.
-  /// If this type is received, it means the batch log
-  /// has been successfully written
-  Batch,
-  /// The write was an unlogged batch. No batch log write has been attempted.
-  UnloggedBatch,
-  /// The write was a counter write (batched or not)
-  Counter,
-  /// The failure occured during the write to the batch log when a (logged) batch
-  /// write was requested.
-  BatchLog,
+    /// The write was a non-batched non-counter write
+    Simple,
+    /// The write was a (logged) batch write.
+    /// If this type is received, it means the batch log
+    /// has been successfully written
+    Batch,
+    /// The write was an unlogged batch. No batch log write has been attempted.
+    UnloggedBatch,
+    /// The write was a counter write (batched or not)
+    Counter,
+    /// The failure occured during the write to the batch log when a (logged) batch
+    /// write was requested.
+    BatchLog,
 }
 
 impl FromCursor for WriteType {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteType> {
-    CString::from_cursor(&mut cursor).and_then(|wt| match wt.as_str() {
-      "SIMPLE" => Ok(WriteType::Simple),
-      "BATCH" => Ok(WriteType::Batch),
-      "UNLOGGED_BATCH" => Ok(WriteType::UnloggedBatch),
-      "COUNTER" => Ok(WriteType::Counter),
-      "BATCH_LOG" => Ok(WriteType::BatchLog),
-      _ => Err("Unexpected write type".into()),
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<WriteType> {
+        CString::from_cursor(&mut cursor).and_then(|wt| match wt.as_str() {
+            "SIMPLE" => Ok(WriteType::Simple),
+            "BATCH" => Ok(WriteType::Batch),
+            "UNLOGGED_BATCH" => Ok(WriteType::UnloggedBatch),
+            "COUNTER" => Ok(WriteType::Counter),
+            "BATCH_LOG" => Ok(WriteType::BatchLog),
+            _ => Err("Unexpected write type".into()),
+        })
+    }
 }
 
 /// The query attempted to create a keyspace or a table that was already existing.
 /// [Read more...](https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1140)
 #[derive(Debug)]
 pub struct AlreadyExistsError {
-  /// Represents either the keyspace that already exists,
-  /// or the keyspace in which the table that already exists is.
-  pub ks: CString,
-  /// Represents the name of the table that already exists.
-  pub table: CString,
+    /// Represents either the keyspace that already exists,
+    /// or the keyspace in which the table that already exists is.
+    pub ks: CString,
+    /// Represents the name of the table that already exists.
+    pub table: CString,
 }
 
 impl FromCursor for AlreadyExistsError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<AlreadyExistsError> {
-    let ks = CString::from_cursor(&mut cursor)?;
-    let table = CString::from_cursor(&mut cursor)?;
-
-    Ok(AlreadyExistsError {
-      ks: ks,
-      table: table,
-    })
-  }
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<AlreadyExistsError> {
+        let ks = CString::from_cursor(&mut cursor)?;
+        let table = CString::from_cursor(&mut cursor)?;
+
+        Ok(AlreadyExistsError {
+            ks: ks,
+            table: table,
+        })
+    }
 }
 
 /// Can be thrown while a prepared statement tries to be
@@ -394,14 +394,14 @@ impl FromCursor for AlreadyExistsError {
 /// (https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L1150)
 #[derive(Debug)]
 pub struct UnpreparedError {
-  /// Unknown ID.
-  pub id: CBytesShort,
+    /// Unknown ID.
+    pub id: CBytesShort,
 }
 
 impl FromCursor for UnpreparedError {
-  fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<UnpreparedError> {
-    let id = CBytesShort::from_cursor(&mut cursor)?;
+    fn from_cursor(mut cursor: &mut io::Cursor<&[u8]>) -> error::Result<UnpreparedError> {
+        let id = CBytesShort::from_cursor(&mut cursor)?;
 
-    Ok(UnpreparedError { id: id })
-  }
+        Ok(UnpreparedError { id: id })
+    }
 }
diff --git a/src/frame/frame_event.rs b/src/frame/frame_event.rs
index 31da6d4..498a314 100644
--- a/src/frame/frame_event.rs
+++ b/src/frame/frame_event.rs
@@ -6,41 +6,41 @@ use crate::frame::FromCursor;
 
 #[derive(Debug)]
 pub struct BodyResEvent {
-  pub event: ServerEvent,
+    pub event: ServerEvent,
 }
 
 impl FromCursor for BodyResEvent {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResEvent> {
-    let event = ServerEvent::from_cursor(&mut cursor)?;
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResEvent> {
+        let event = ServerEvent::from_cursor(&mut cursor)?;
 
-    Ok(BodyResEvent { event: event })
-  }
+        Ok(BodyResEvent { event: event })
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::events::*;
-  use crate::frame::traits::FromCursor;
-  use std::io::Cursor;
+    use super::*;
+    use crate::frame::events::*;
+    use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
-  #[test]
-  fn body_res_event() {
-    let bytes = [
-      // TOPOLOGY_CHANGE
-      0, 15, 84, 79, 80, 79, 76, 79, 71, 89, 95, 67, 72, 65, 78, 71, 69, // NEW_NODE
-      0, 8, 78, 69, 87, 95, 78, 79, 68, 69, // inet - 127.0.0.1:1
-      0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
-    ];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(&bytes);
-    let event = BodyResEvent::from_cursor(&mut cursor).unwrap().event;
+    #[test]
+    fn body_res_event() {
+        let bytes = [
+            // TOPOLOGY_CHANGE
+            0, 15, 84, 79, 80, 79, 76, 79, 71, 89, 95, 67, 72, 65, 78, 71, 69, // NEW_NODE
+            0, 8, 78, 69, 87, 95, 78, 79, 68, 69, // inet - 127.0.0.1:1
+            0, 4, 127, 0, 0, 1, 0, 0, 0, 1,
+        ];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(&bytes);
+        let event = BodyResEvent::from_cursor(&mut cursor).unwrap().event;
 
-    match event {
-      ServerEvent::TopologyChange(ref tc) => {
-        assert_eq!(tc.change_type, TopologyChangeType::NewNode);
-        assert_eq!(format!("{:?}", tc.addr.addr), "V4(127.0.0.1:1)");
-      }
-      _ => panic!("should be topology change event"),
+        match event {
+            ServerEvent::TopologyChange(ref tc) => {
+                assert_eq!(tc.change_type, TopologyChangeType::NewNode);
+                assert_eq!(format!("{:?}", tc.addr.addr), "V4(127.0.0.1:1)");
+            }
+            _ => panic!("should be topology change event"),
+        }
     }
-  }
 }
diff --git a/src/frame/frame_execute.rs b/src/frame/frame_execute.rs
index da15a6e..c54e40b 100644
--- a/src/frame/frame_execute.rs
+++ b/src/frame/frame_execute.rs
@@ -7,57 +7,57 @@ use crate::types::*;
 /// The structure that represents a body of a frame of type `execute`.
 #[derive(Debug)]
 pub struct BodyReqExecute<'a> {
-  /// Id of prepared query
-  id: &'a CBytesShort,
-  /// Query paramaters which have the same meaning as one for `query`
-  /// TODO: clarify if it is QueryParams or its shortened variant
-  query_parameters: QueryParams,
+    /// Id of prepared query
+    id: &'a CBytesShort,
+    /// Query paramaters which have the same meaning as one for `query`
+    /// TODO: clarify if it is QueryParams or its shortened variant
+    query_parameters: QueryParams,
 }
 
 impl<'a> BodyReqExecute<'a> {
-  /// The method which creates new instance of `BodyReqExecute`
-  pub fn new(id: &CBytesShort, query_parameters: QueryParams) -> BodyReqExecute {
-    BodyReqExecute {
-      id: id,
-      query_parameters: query_parameters,
+    /// The method which creates new instance of `BodyReqExecute`
+    pub fn new(id: &CBytesShort, query_parameters: QueryParams) -> BodyReqExecute {
+        BodyReqExecute {
+            id: id,
+            query_parameters: query_parameters,
+        }
     }
-  }
 }
 
 impl<'a> IntoBytes for BodyReqExecute<'a> {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v: Vec<u8> = vec![];
-    v.extend_from_slice(self.id.into_cbytes().as_slice());
-    v.extend_from_slice(self.query_parameters.into_cbytes().as_slice());
-    v
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v: Vec<u8> = vec![];
+        v.extend_from_slice(self.id.into_cbytes().as_slice());
+        v.extend_from_slice(self.query_parameters.into_cbytes().as_slice());
+        v
+    }
 }
 
 impl Frame {
-  /// **Note:** This function should be used internally for building query request frames.
-  pub fn new_req_execute(
-    id: &CBytesShort,
-    query_parameters: QueryParams,
-    flags: Vec<Flag>,
-  ) -> Frame {
-    let version = Version::Request;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Execute;
-    debug!(
-      "prepared statement id{:?} getting executed with parameters {:?}",
-      id, query_parameters
-    );
-    let body = BodyReqExecute::new(id, query_parameters);
+    /// **Note:** This function should be used internally for building query request frames.
+    pub fn new_req_execute(
+        id: &CBytesShort,
+        query_parameters: QueryParams,
+        flags: Vec<Flag>,
+    ) -> Frame {
+        let version = Version::Request;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Execute;
+        debug!(
+            "prepared statement id{:?} getting executed with parameters {:?}",
+            id, query_parameters
+        );
+        let body = BodyReqExecute::new(id, query_parameters);
 
-    Frame {
-      version: version,
-      flags: flags,
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: flags,
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
diff --git a/src/frame/frame_options.rs b/src/frame/frame_options.rs
index e75c31b..cfe8967 100644
--- a/src/frame/frame_options.rs
+++ b/src/frame/frame_options.rs
@@ -7,44 +7,44 @@ use crate::frame::*;
 pub struct BodyReqOptions;
 
 impl IntoBytes for BodyReqOptions {
-  fn into_cbytes(&self) -> Vec<u8> {
-    vec![]
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        vec![]
+    }
 }
 
 // Frame implementation related to BodyReqStartup
 
 impl Frame {
-  /// Creates new frame of type `options`.
-  pub fn new_req_options() -> Frame {
-    let version = Version::Request;
-    let flag = Flag::Ignore;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Options;
-    let body: BodyReqOptions = Default::default();
-
-    Frame {
-      version: version,
-      flags: vec![flag],
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+    /// Creates new frame of type `options`.
+    pub fn new_req_options() -> Frame {
+        let version = Version::Request;
+        let flag = Flag::Ignore;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Options;
+        let body: BodyReqOptions = Default::default();
+
+        Frame {
+            version: version,
+            flags: vec![flag],
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn test_frame_options() {
-    let frame = Frame::new_req_options();
-    assert_eq!(frame.version, Version::Request);
-    assert_eq!(frame.opcode, Opcode::Options);
-    assert_eq!(frame.body, vec![]);
-  }
+    use super::*;
+
+    #[test]
+    fn test_frame_options() {
+        let frame = Frame::new_req_options();
+        assert_eq!(frame.version, Version::Request);
+        assert_eq!(frame.opcode, Opcode::Options);
+        assert_eq!(frame.body, vec![]);
+    }
 }
diff --git a/src/frame/frame_prepare.rs b/src/frame/frame_prepare.rs
index 77fb073..7a00a05 100644
--- a/src/frame/frame_prepare.rs
+++ b/src/frame/frame_prepare.rs
@@ -6,41 +6,41 @@ use crate::types::*;
 /// Struct that represents a body of a frame of type `prepare`
 #[derive(Debug)]
 pub struct BodyReqPrepare {
-  query: CStringLong,
+    query: CStringLong,
 }
 
 impl BodyReqPrepare {
-  /// Creates new body of a frame of type `prepare` that prepares query `query`.
-  pub fn new(query: String) -> BodyReqPrepare {
-    BodyReqPrepare {
-      query: CStringLong::new(query),
+    /// Creates new body of a frame of type `prepare` that prepares query `query`.
+    pub fn new(query: String) -> BodyReqPrepare {
+        BodyReqPrepare {
+            query: CStringLong::new(query),
+        }
     }
-  }
 }
 
 impl IntoBytes for BodyReqPrepare {
-  fn into_cbytes(&self) -> Vec<u8> {
-    self.query.into_cbytes()
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        self.query.into_cbytes()
+    }
 }
 
 impl Frame {
-  /// **Note:** This function should be used internally for building query request frames.
-  pub fn new_req_prepare(query: String, flags: Vec<Flag>) -> Frame {
-    let version = Version::Request;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Prepare;
-    let body = BodyReqPrepare::new(query);
+    /// **Note:** This function should be used internally for building query request frames.
+    pub fn new_req_prepare(query: String, flags: Vec<Flag>) -> Frame {
+        let version = Version::Request;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Prepare;
+        let body = BodyReqPrepare::new(query);
 
-    Frame {
-      version: version,
-      flags: flags,
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: flags,
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
diff --git a/src/frame/frame_query.rs b/src/frame/frame_query.rs
index 537e086..49487ef 100644
--- a/src/frame/frame_query.rs
+++ b/src/frame/frame_query.rs
@@ -10,123 +10,123 @@ use crate::types::*;
 /// Structure which represents body of Query request
 #[derive(Debug)]
 pub struct BodyReqQuery {
-  /// Query string.
-  pub query: CStringLong,
-  /// Query parameters.
-  pub query_params: QueryParams,
+    /// Query string.
+    pub query: CStringLong,
+    /// Query parameters.
+    pub query_params: QueryParams,
 }
 
 impl BodyReqQuery {
-  // Fabric function that produces Query request body.
-  fn new(
-    query: String,
-    consistency: Consistency,
-    values: Option<QueryValues>,
-    with_names: Option<bool>,
-    page_size: Option<i32>,
-    paging_state: Option<CBytes>,
-    serial_consistency: Option<Consistency>,
-    timestamp: Option<i64>,
-  ) -> BodyReqQuery {
-    // query flags
-    let mut flags: Vec<QueryFlags> = vec![];
-    if values.is_some() {
-      flags.push(QueryFlags::Value);
-    }
-    if with_names.unwrap_or(false) {
-      flags.push(QueryFlags::WithNamesForValues);
-    }
-    if page_size.is_some() {
-      flags.push(QueryFlags::PageSize);
-    }
-    if paging_state.is_some() {
-      flags.push(QueryFlags::WithPagingState);
-    }
-    if serial_consistency.is_some() {
-      flags.push(QueryFlags::WithSerialConsistency);
-    }
-    if timestamp.is_some() {
-      flags.push(QueryFlags::WithDefaultTimestamp);
-    }
+    // Fabric function that produces Query request body.
+    fn new(
+        query: String,
+        consistency: Consistency,
+        values: Option<QueryValues>,
+        with_names: Option<bool>,
+        page_size: Option<i32>,
+        paging_state: Option<CBytes>,
+        serial_consistency: Option<Consistency>,
+        timestamp: Option<i64>,
+    ) -> BodyReqQuery {
+        // query flags
+        let mut flags: Vec<QueryFlags> = vec![];
+        if values.is_some() {
+            flags.push(QueryFlags::Value);
+        }
+        if with_names.unwrap_or(false) {
+            flags.push(QueryFlags::WithNamesForValues);
+        }
+        if page_size.is_some() {
+            flags.push(QueryFlags::PageSize);
+        }
+        if paging_state.is_some() {
+            flags.push(QueryFlags::WithPagingState);
+        }
+        if serial_consistency.is_some() {
+            flags.push(QueryFlags::WithSerialConsistency);
+        }
+        if timestamp.is_some() {
+            flags.push(QueryFlags::WithDefaultTimestamp);
+        }
 
-    BodyReqQuery {
-      query: CStringLong::new(query),
-      query_params: QueryParams {
-        consistency,
-        flags,
-        with_names,
-        values,
-        page_size,
-        paging_state,
-        serial_consistency,
-        timestamp,
-      },
+        BodyReqQuery {
+            query: CStringLong::new(query),
+            query_params: QueryParams {
+                consistency,
+                flags,
+                with_names,
+                values,
+                page_size,
+                paging_state,
+                serial_consistency,
+                timestamp,
+            },
+        }
     }
-  }
 }
 
 impl IntoBytes for BodyReqQuery {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v: Vec<u8> = vec![];
-    v.extend_from_slice(self.query.clone().into_cbytes().as_slice());
-    v.extend_from_slice(self.query_params.into_cbytes().as_slice());
-    v
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v: Vec<u8> = vec![];
+        v.extend_from_slice(self.query.clone().into_cbytes().as_slice());
+        v.extend_from_slice(self.query_params.into_cbytes().as_slice());
+        v
+    }
 }
 
 // Frame implementation related to BodyReqStartup
 
 impl Frame {
-  /// **Note:** This function should be used internally for building query request frames.
-  pub fn new_req_query(
-    query: String,
-    consistency: Consistency,
-    values: Option<QueryValues>,
-    with_names: Option<bool>,
-    page_size: Option<i32>,
-    paging_state: Option<CBytes>,
-    serial_consistency: Option<Consistency>,
-    timestamp: Option<i64>,
-    flags: Vec<Flag>,
-  ) -> Frame {
-    let version = Version::Request;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Query;
-    let body = BodyReqQuery::new(
-      query,
-      consistency,
-      values,
-      with_names,
-      page_size,
-      paging_state,
-      serial_consistency,
-      timestamp,
-    );
+    /// **Note:** This function should be used internally for building query request frames.
+    pub fn new_req_query(
+        query: String,
+        consistency: Consistency,
+        values: Option<QueryValues>,
+        with_names: Option<bool>,
+        page_size: Option<i32>,
+        paging_state: Option<CBytes>,
+        serial_consistency: Option<Consistency>,
+        timestamp: Option<i64>,
+        flags: Vec<Flag>,
+    ) -> Frame {
+        let version = Version::Request;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Query;
+        let body = BodyReqQuery::new(
+            query,
+            consistency,
+            values,
+            with_names,
+            page_size,
+            paging_state,
+            serial_consistency,
+            timestamp,
+        );
 
-    Frame {
-      version: version,
-      flags: flags,
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: flags,
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 
-  /// **Note:** This function should be used internally for building query request frames.
-  pub fn new_query(query: Query, flags: Vec<Flag>) -> Frame {
-    Frame::new_req_query(
-      query.query,
-      query.params.consistency,
-      query.params.values,
-      query.params.with_names,
-      query.params.page_size,
-      query.params.paging_state,
-      query.params.serial_consistency,
-      query.params.timestamp,
-      flags,
-    )
-  }
+    /// **Note:** This function should be used internally for building query request frames.
+    pub fn new_query(query: Query, flags: Vec<Flag>) -> Frame {
+        Frame::new_req_query(
+            query.query,
+            query.params.consistency,
+            query.params.values,
+            query.params.with_names,
+            query.params.page_size,
+            query.params.paging_state,
+            query.params.serial_consistency,
+            query.params.timestamp,
+            flags,
+        )
+    }
 }
diff --git a/src/frame/frame_ready.rs b/src/frame/frame_ready.rs
index cf27154..a503b31 100644
--- a/src/frame/frame_ready.rs
+++ b/src/frame/frame_ready.rs
@@ -6,37 +6,37 @@ use crate::frame::IntoBytes;
 pub struct BodyResReady;
 
 impl From<Vec<u8>> for BodyResReady {
-  fn from(_vec: Vec<u8>) -> BodyResReady {
-    BodyResReady {}
-  }
+    fn from(_vec: Vec<u8>) -> BodyResReady {
+        BodyResReady {}
+    }
 }
 
 impl IntoBytes for BodyResReady {
-  fn into_cbytes(&self) -> Vec<u8> {
-    vec![]
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        vec![]
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::IntoBytes;
-
-  #[test]
-  fn body_res_ready_new() {
-    let body: BodyResReady = Default::default();
-    assert_eq!(body, BodyResReady {});
-  }
-
-  #[test]
-  fn body_res_ready_into_cbytes() {
-    let body = BodyResReady {};
-    assert_eq!(body.into_cbytes(), vec![] as Vec<u8>);
-  }
-
-  #[test]
-  fn body_res_ready_from() {
-    let body = BodyResReady::from(vec![]);
-    assert_eq!(body, BodyResReady {});
-  }
+    use super::*;
+    use crate::frame::traits::IntoBytes;
+
+    #[test]
+    fn body_res_ready_new() {
+        let body: BodyResReady = Default::default();
+        assert_eq!(body, BodyResReady {});
+    }
+
+    #[test]
+    fn body_res_ready_into_cbytes() {
+        let body = BodyResReady {};
+        assert_eq!(body.into_cbytes(), vec![] as Vec<u8>);
+    }
+
+    #[test]
+    fn body_res_ready_from() {
+        let body = BodyResReady::from(vec![]);
+        assert_eq!(body, BodyResReady {});
+    }
 }
diff --git a/src/frame/frame_register.rs b/src/frame/frame_register.rs
index 4ea1827..34035b8 100644
--- a/src/frame/frame_register.rs
+++ b/src/frame/frame_register.rs
@@ -6,42 +6,42 @@ use crate::types::{CString, CStringList};
 
 /// The structure which represents a body of a frame of type `options`.
 pub struct BodyReqRegister {
-  pub events: Vec<SimpleServerEvent>,
+    pub events: Vec<SimpleServerEvent>,
 }
 
 impl IntoBytes for BodyReqRegister {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let events_string_list = CStringList {
-      list: self
-        .events
-        .iter()
-        .map(|event| CString::new(event.as_string()))
-        .collect(),
-    };
-    events_string_list.into_cbytes()
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let events_string_list = CStringList {
+            list: self
+                .events
+                .iter()
+                .map(|event| CString::new(event.as_string()))
+                .collect(),
+        };
+        events_string_list.into_cbytes()
+    }
 }
 
 // Frame implementation related to BodyReqRegister
 
 impl Frame {
-  /// Creates new frame of type `REGISTER`.
-  pub fn new_req_register(events: Vec<SimpleServerEvent>) -> Frame {
-    let version = Version::Request;
-    let flag = Flag::Ignore;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Register;
-    let register_body = BodyReqRegister { events: events };
+    /// Creates new frame of type `REGISTER`.
+    pub fn new_req_register(events: Vec<SimpleServerEvent>) -> Frame {
+        let version = Version::Request;
+        let flag = Flag::Ignore;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Register;
+        let register_body = BodyReqRegister { events: events };
 
-    Frame {
-      version: version,
-      flags: vec![flag],
-      stream: stream,
-      opcode: opcode,
-      body: register_body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: vec![flag],
+            stream: stream,
+            opcode: opcode,
+            body: register_body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
diff --git a/src/frame/frame_response.rs b/src/frame/frame_response.rs
index 7a1a271..2af5e92 100644
--- a/src/frame/frame_response.rs
+++ b/src/frame/frame_response.rs
@@ -7,8 +7,8 @@ use crate::frame::frame_authenticate::BodyResAuthenticate;
 use crate::frame::frame_error::CDRSError;
 use crate::frame::frame_event::BodyResEvent;
 use crate::frame::frame_result::{
-  BodyResResultPrepared, BodyResResultRows, BodyResResultSetKeyspace, BodyResResultVoid,
-  ResResultBody, RowsMetadata,
+    BodyResResultPrepared, BodyResResultRows, BodyResResultSetKeyspace, BodyResResultVoid,
+    ResResultBody, RowsMetadata,
 };
 use crate::frame::frame_supported::*;
 use crate::frame::FromCursor;
@@ -17,111 +17,113 @@ use crate::types::rows::Row;
 
 #[derive(Debug)]
 pub enum ResponseBody {
-  Error(CDRSError),
-  Startup,
-  Ready(BodyResResultVoid),
-  Authenticate(BodyResAuthenticate),
-  Options,
-  Supported(BodyResSupported),
-  Query,
-  Result(ResResultBody),
-  Prepare,
-  Execute,
-  Register,
-  Event(BodyResEvent),
-  Batch,
-  AuthChallenge(BodyResAuthChallenge),
-  AuthResponse,
-  AuthSuccess(BodyReqAuthSuccess),
+    Error(CDRSError),
+    Startup,
+    Ready(BodyResResultVoid),
+    Authenticate(BodyResAuthenticate),
+    Options,
+    Supported(BodyResSupported),
+    Query,
+    Result(ResResultBody),
+    Prepare,
+    Execute,
+    Register,
+    Event(BodyResEvent),
+    Batch,
+    AuthChallenge(BodyResAuthChallenge),
+    AuthResponse,
+    AuthSuccess(BodyReqAuthSuccess),
 }
 
 impl ResponseBody {
-  pub fn from(bytes: &[u8], response_type: &Opcode) -> error::Result<ResponseBody> {
-    let mut cursor: Cursor<&[u8]> = Cursor::new(bytes);
-    Ok(match *response_type {
-      // request frames
-      Opcode::Startup => unreachable!(),
-      Opcode::Options => unreachable!(),
-      Opcode::Query => unreachable!(),
-      Opcode::Prepare => unreachable!(),
-      Opcode::Execute => unreachable!(),
-      Opcode::Register => unreachable!(),
-      Opcode::Batch => unreachable!(),
-      Opcode::AuthResponse => unreachable!(),
+    pub fn from(bytes: &[u8], response_type: &Opcode) -> error::Result<ResponseBody> {
+        let mut cursor: Cursor<&[u8]> = Cursor::new(bytes);
+        Ok(match *response_type {
+            // request frames
+            Opcode::Startup => unreachable!(),
+            Opcode::Options => unreachable!(),
+            Opcode::Query => unreachable!(),
+            Opcode::Prepare => unreachable!(),
+            Opcode::Execute => unreachable!(),
+            Opcode::Register => unreachable!(),
+            Opcode::Batch => unreachable!(),
+            Opcode::AuthResponse => unreachable!(),
 
-      // response frames
-      Opcode::Error => ResponseBody::Error(CDRSError::from_cursor(&mut cursor)?),
-      Opcode::Ready => ResponseBody::Ready(BodyResResultVoid::from_cursor(&mut cursor)?),
-      Opcode::Authenticate => {
-        ResponseBody::Authenticate(BodyResAuthenticate::from_cursor(&mut cursor)?)
-      }
-      Opcode::Supported => ResponseBody::Supported(BodyResSupported::from_cursor(&mut cursor)?),
-      Opcode::Result => ResponseBody::Result(ResResultBody::from_cursor(&mut cursor)?),
-      Opcode::Event => ResponseBody::Event(BodyResEvent::from_cursor(&mut cursor)?),
-      Opcode::AuthChallenge => {
-        ResponseBody::AuthChallenge(BodyResAuthChallenge::from_cursor(&mut cursor)?)
-      }
-      Opcode::AuthSuccess => {
-        ResponseBody::AuthSuccess(BodyReqAuthSuccess::from_cursor(&mut cursor)?)
-      }
-    })
-  }
+            // response frames
+            Opcode::Error => ResponseBody::Error(CDRSError::from_cursor(&mut cursor)?),
+            Opcode::Ready => ResponseBody::Ready(BodyResResultVoid::from_cursor(&mut cursor)?),
+            Opcode::Authenticate => {
+                ResponseBody::Authenticate(BodyResAuthenticate::from_cursor(&mut cursor)?)
+            }
+            Opcode::Supported => {
+                ResponseBody::Supported(BodyResSupported::from_cursor(&mut cursor)?)
+            }
+            Opcode::Result => ResponseBody::Result(ResResultBody::from_cursor(&mut cursor)?),
+            Opcode::Event => ResponseBody::Event(BodyResEvent::from_cursor(&mut cursor)?),
+            Opcode::AuthChallenge => {
+                ResponseBody::AuthChallenge(BodyResAuthChallenge::from_cursor(&mut cursor)?)
+            }
+            Opcode::AuthSuccess => {
+                ResponseBody::AuthSuccess(BodyReqAuthSuccess::from_cursor(&mut cursor)?)
+            }
+        })
+    }
 
-  pub fn into_rows(self) -> Option<Vec<Row>> {
-    match self {
-      ResponseBody::Result(res) => res.into_rows(),
-      _ => None,
+    pub fn into_rows(self) -> Option<Vec<Row>> {
+        match self {
+            ResponseBody::Result(res) => res.into_rows(),
+            _ => None,
+        }
     }
-  }
 
-  pub fn as_rows_metadata(&self) -> Option<RowsMetadata> {
-    match *self {
-      ResponseBody::Result(ref res) => res.as_rows_metadata(),
-      _ => None,
+    pub fn as_rows_metadata(&self) -> Option<RowsMetadata> {
+        match *self {
+            ResponseBody::Result(ref res) => res.as_rows_metadata(),
+            _ => None,
+        }
     }
-  }
 
-  pub fn as_cols(&self) -> Option<&BodyResResultRows> {
-    match *self {
-      ResponseBody::Result(ref res) => match res {
-        &ResResultBody::Rows(ref rows) => Some(rows),
-        _ => None,
-      },
-      _ => None,
+    pub fn as_cols(&self) -> Option<&BodyResResultRows> {
+        match *self {
+            ResponseBody::Result(ref res) => match res {
+                &ResResultBody::Rows(ref rows) => Some(rows),
+                _ => None,
+            },
+            _ => None,
+        }
     }
-  }
 
-  /// It unwraps body and returns BodyResResultPrepared which contains an exact result of
-  /// PREPARE query. If frame body is not of type `Result` this method returns `None`.
-  pub fn into_prepared(self) -> Option<BodyResResultPrepared> {
-    match self {
-      ResponseBody::Result(res) => res.into_prepared(),
-      _ => None,
+    /// It unwraps body and returns BodyResResultPrepared which contains an exact result of
+    /// PREPARE query. If frame body is not of type `Result` this method returns `None`.
+    pub fn into_prepared(self) -> Option<BodyResResultPrepared> {
+        match self {
+            ResponseBody::Result(res) => res.into_prepared(),
+            _ => None,
+        }
     }
-  }
 
-  /// It unwraps body and returns BodyResResultPrepared which contains an exact result of
-  /// use keyspace query. If frame body is not of type `Result` this method returns `None`.
-  pub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace> {
-    match self {
-      ResponseBody::Result(res) => res.into_set_keyspace(),
-      _ => None,
+    /// It unwraps body and returns BodyResResultPrepared which contains an exact result of
+    /// use keyspace query. If frame body is not of type `Result` this method returns `None`.
+    pub fn into_set_keyspace(self) -> Option<BodyResResultSetKeyspace> {
+        match self {
+            ResponseBody::Result(res) => res.into_set_keyspace(),
+            _ => None,
+        }
     }
-  }
 
-  /// It unwraps body and returns BodyResEvent.
-  /// If frame body is not of type `Result` this method returns `None`.
-  pub fn into_server_event(self) -> Option<BodyResEvent> {
-    match self {
-      ResponseBody::Event(event) => Some(event),
-      _ => None,
+    /// It unwraps body and returns BodyResEvent.
+    /// If frame body is not of type `Result` this method returns `None`.
+    pub fn into_server_event(self) -> Option<BodyResEvent> {
+        match self {
+            ResponseBody::Event(event) => Some(event),
+            _ => None,
+        }
     }
-  }
 
-  pub fn get_authenticator<'a>(&'a self) -> Option<&'a str> {
-    match *self {
-      ResponseBody::Authenticate(ref auth) => Some(auth.data.as_str()),
-      _ => None,
+    pub fn get_authenticator<'a>(&'a self) -> Option<&'a str> {
+        match *self {
+            ResponseBody::Authenticate(ref auth) => Some(auth.data.as_str()),
+            _ => None,
+        }
     }
-  }
 }
diff --git a/src/frame/frame_result.rs b/src/frame/frame_result.rs
index 4759adc..898fd56 100644
--- a/src/frame/frame_result.rs
+++ b/src/frame/frame_result.rs
@@ -1,10 +1,10 @@
 use std::io::Cursor;
 
-use crate::frame::{FromBytes, FromCursor, IntoBytes};
 use crate::error;
-use crate::types::*;
-use crate::types::rows::Row;
 use crate::frame::events::SchemaChange;
+use crate::frame::{FromBytes, FromCursor, IntoBytes};
+use crate::types::rows::Row;
+use crate::types::*;
 
 /// `ResultKind` is enum which represents types of result.
 #[derive(Debug)]
@@ -35,15 +35,16 @@ impl IntoBytes for ResultKind {
 
 impl FromBytes for ResultKind {
     fn from_bytes(bytes: &[u8]) -> error::Result<ResultKind> {
-        try_from_bytes(bytes).map_err(Into::into)
-                             .and_then(|r| match r {
-                                           0x0001 => Ok(ResultKind::Void),
-                                           0x0002 => Ok(ResultKind::Rows),
-                                           0x0003 => Ok(ResultKind::SetKeyspace),
-                                           0x0004 => Ok(ResultKind::Prepared),
-                                           0x0005 => Ok(ResultKind::SchemaChange),
-                                           _ => Err("Unexpected result kind".into()),
-                                       })
+        try_from_bytes(bytes)
+            .map_err(Into::into)
+            .and_then(|r| match r {
+                0x0001 => Ok(ResultKind::Void),
+                0x0002 => Ok(ResultKind::Rows),
+                0x0003 => Ok(ResultKind::SetKeyspace),
+                0x0004 => Ok(ResultKind::Prepared),
+                0x0005 => Ok(ResultKind::SchemaChange),
+                _ => Err("Unexpected result kind".into()),
+            })
     }
 }
 
@@ -74,9 +75,10 @@ pub enum ResResultBody {
 impl ResResultBody {
     /// It retrieves`ResResultBody` from `io::Cursor`
     /// having knowledge about expected kind of result.
-    fn parse_body_from_cursor(mut cursor: &mut Cursor<&[u8]>,
-                              result_kind: ResultKind)
-                              -> error::Result<ResResultBody> {
+    fn parse_body_from_cursor(
+        mut cursor: &mut Cursor<&[u8]>,
+        result_kind: ResultKind,
+    ) -> error::Result<ResResultBody> {
         Ok(match result_kind {
             ResultKind::Void => ResResultBody::Void(BodyResResultVoid::from_cursor(&mut cursor)?),
             ResultKind::Rows => ResResultBody::Rows(BodyResResultRows::from_cursor(&mut cursor)?),
@@ -189,17 +191,19 @@ pub struct BodyResResultRows {
 
 impl BodyResResultRows {
     /// It retrieves rows content having knowledge about number of rows and columns.
-    fn get_rows_content(mut cursor: &mut Cursor<&[u8]>,
-                        rows_count: i32,
-                        columns_count: i32)
-                        -> Vec<Vec<CBytes>> {
-        (0..rows_count).map(|_| {
-                           (0..columns_count)
-                     // XXX unwrap()
-                         .map(|_| CBytes::from_cursor(&mut cursor).unwrap() as CBytes)
-                         .collect()
-                       })
-                       .collect()
+    fn get_rows_content(
+        mut cursor: &mut Cursor<&[u8]>,
+        rows_count: i32,
+        columns_count: i32,
+    ) -> Vec<Vec<CBytes>> {
+        (0..rows_count)
+            .map(|_| {
+                (0..columns_count)
+                    // XXX unwrap()
+                    .map(|_| CBytes::from_cursor(&mut cursor).unwrap() as CBytes)
+                    .collect()
+            })
+            .collect()
     }
 }
 
@@ -210,9 +214,11 @@ impl FromCursor for BodyResResultRows {
         let rows_content: Vec<Vec<CBytes>> =
             BodyResResultRows::get_rows_content(&mut cursor, rows_count, metadata.columns_count);
 
-        Ok(BodyResResultRows { metadata: metadata,
-                               rows_count: rows_count,
-                               rows_content: rows_content, })
+        Ok(BodyResResultRows {
+            metadata: metadata,
+            rows_count: rows_count,
+            rows_content: rows_content,
+        })
     }
 }
 
@@ -255,11 +261,13 @@ impl FromCursor for RowsMetadata {
 
         let col_specs = ColSpec::parse_colspecs(&mut cursor, columns_count, has_global_table_space);
 
-        Ok(RowsMetadata { flags: flags,
-                          columns_count: columns_count,
-                          paging_state: paging_state,
-                          global_table_space: global_table_space,
-                          col_specs: col_specs, })
+        Ok(RowsMetadata {
+            flags: flags,
+            columns_count: columns_count,
+            paging_state: paging_state,
+            global_table_space: global_table_space,
+            col_specs: col_specs,
+        })
     }
 }
 
@@ -318,15 +326,14 @@ impl IntoBytes for RowsMetadataFlag {
 
 impl FromBytes for RowsMetadataFlag {
     fn from_bytes(bytes: &[u8]) -> error::Result<RowsMetadataFlag> {
-        try_from_bytes(bytes).map_err(Into::into)
-                             .and_then(|f| match f as i32 {
-                                           GLOBAL_TABLE_SPACE => {
-                                               Ok(RowsMetadataFlag::GlobalTableSpace)
-                                           }
-                                           HAS_MORE_PAGES => Ok(RowsMetadataFlag::HasMorePages),
-                                           NO_METADATA => Ok(RowsMetadataFlag::NoMetadata),
-                                           _ => Err("Unexpected rows metadata flag".into()),
-                                       })
+        try_from_bytes(bytes)
+            .map_err(Into::into)
+            .and_then(|f| match f as i32 {
+                GLOBAL_TABLE_SPACE => Ok(RowsMetadataFlag::GlobalTableSpace),
+                HAS_MORE_PAGES => Ok(RowsMetadataFlag::HasMorePages),
+                NO_METADATA => Ok(RowsMetadataFlag::NoMetadata),
+                _ => Err("Unexpected rows metadata flag".into()),
+            })
     }
 }
 
@@ -349,33 +356,37 @@ impl ColSpec {
     /// parse_colspecs tables mutable cursor,
     /// number of columns (column_count) and flags that indicates
     /// if Global_tables_spec is specified. It returns column_count of ColSpecs.
-    pub fn parse_colspecs(mut cursor: &mut Cursor<&[u8]>,
-                          column_count: i32,
-                          with_globale_table_spec: bool)
-                          -> Vec<ColSpec> {
-        (0..column_count).map(|_| {
-                                  let ksname: Option<CString> = if !with_globale_table_spec {
-                                      Some(CString::from_cursor(&mut cursor).unwrap())
-                                  } else {
-                                      None
-                                  };
-
-                                  let tablename = if !with_globale_table_spec {
-                                      Some(CString::from_cursor(&mut cursor).unwrap())
-                                  } else {
-                                      None
-                                  };
-
-                                  // XXX unwrap
-                                  let name = CString::from_cursor(&mut cursor).unwrap();
-                                  let col_type = ColTypeOption::from_cursor(&mut cursor).unwrap();
-
-                                  ColSpec { ksname: ksname,
-                                            tablename: tablename,
-                                            name: name,
-                                            col_type: col_type, }
-                              })
-                         .collect()
+    pub fn parse_colspecs(
+        mut cursor: &mut Cursor<&[u8]>,
+        column_count: i32,
+        with_globale_table_spec: bool,
+    ) -> Vec<ColSpec> {
+        (0..column_count)
+            .map(|_| {
+                let ksname: Option<CString> = if !with_globale_table_spec {
+                    Some(CString::from_cursor(&mut cursor).unwrap())
+                } else {
+                    None
+                };
+
+                let tablename = if !with_globale_table_spec {
+                    Some(CString::from_cursor(&mut cursor).unwrap())
+                } else {
+                    None
+                };
+
+                // XXX unwrap
+                let name = CString::from_cursor(&mut cursor).unwrap();
+                let col_type = ColTypeOption::from_cursor(&mut cursor).unwrap();
+
+                ColSpec {
+                    ksname: ksname,
+                    tablename: tablename,
+                    name: name,
+                    col_type: col_type,
+                }
+            })
+            .collect()
     }
 }
 
@@ -412,35 +423,36 @@ pub enum ColType {
 
 impl FromBytes for ColType {
     fn from_bytes(bytes: &[u8]) -> error::Result<ColType> {
-        try_from_bytes(bytes).map_err(Into::into)
-                             .and_then(|b| match b {
-                                           0x0000 => Ok(ColType::Custom),
-                                           0x0001 => Ok(ColType::Ascii),
-                                           0x0002 => Ok(ColType::Bigint),
-                                           0x0003 => Ok(ColType::Blob),
-                                           0x0004 => Ok(ColType::Boolean),
-                                           0x0005 => Ok(ColType::Counter),
-                                           0x0006 => Ok(ColType::Decimal),
-                                           0x0007 => Ok(ColType::Double),
-                                           0x0008 => Ok(ColType::Float),
-                                           0x0009 => Ok(ColType::Int),
-                                           0x000B => Ok(ColType::Timestamp),
-                                           0x000C => Ok(ColType::Uuid),
-                                           0x000D => Ok(ColType::Varchar),
-                                           0x000E => Ok(ColType::Varint),
-                                           0x000F => Ok(ColType::Timeuuid),
-                                           0x0010 => Ok(ColType::Inet),
-                                           0x0011 => Ok(ColType::Date),
-                                           0x0012 => Ok(ColType::Time),
-                                           0x0013 => Ok(ColType::Smallint),
-                                           0x0014 => Ok(ColType::Tinyint),
-                                           0x0020 => Ok(ColType::List),
-                                           0x0021 => Ok(ColType::Map),
-                                           0x0022 => Ok(ColType::Set),
-                                           0x0030 => Ok(ColType::Udt),
-                                           0x0031 => Ok(ColType::Tuple),
-                                           _ => Err("Unexpected column type".into()),
-                                       })
+        try_from_bytes(bytes)
+            .map_err(Into::into)
+            .and_then(|b| match b {
+                0x0000 => Ok(ColType::Custom),
+                0x0001 => Ok(ColType::Ascii),
+                0x0002 => Ok(ColType::Bigint),
+                0x0003 => Ok(ColType::Blob),
+                0x0004 => Ok(ColType::Boolean),
+                0x0005 => Ok(ColType::Counter),
+                0x0006 => Ok(ColType::Decimal),
+                0x0007 => Ok(ColType::Double),
+                0x0008 => Ok(ColType::Float),
+                0x0009 => Ok(ColType::Int),
+                0x000B => Ok(ColType::Timestamp),
+                0x000C => Ok(ColType::Uuid),
+                0x000D => Ok(ColType::Varchar),
+                0x000E => Ok(ColType::Varint),
+                0x000F => Ok(ColType::Timeuuid),
+                0x0010 => Ok(ColType::Inet),
+                0x0011 => Ok(ColType::Date),
+                0x0012 => Ok(ColType::Time),
+                0x0013 => Ok(ColType::Smallint),
+                0x0014 => Ok(ColType::Tinyint),
+                0x0020 => Ok(ColType::List),
+                0x0021 => Ok(ColType::Map),
+                0x0022 => Ok(ColType::Set),
+                0x0030 => Ok(ColType::Udt),
+                0x0031 => Ok(ColType::Tuple),
+                _ => Err("Unexpected column type".into()),
+            })
     }
 }
 
@@ -467,9 +479,9 @@ impl FromCursor for ColTypeOption {
     fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<ColTypeOption> {
         let id = ColType::from_cursor(&mut cursor)?;
         let value = match id {
-            ColType::Custom => {
-                Some(ColTypeOptionValue::CString(CString::from_cursor(&mut cursor)?))
-            }
+            ColType::Custom => Some(ColTypeOptionValue::CString(CString::from_cursor(
+                &mut cursor,
+            )?)),
             ColType::Set => {
                 let col_type = ColTypeOption::from_cursor(&mut cursor)?;
                 Some(ColTypeOptionValue::CSet(Box::new(col_type)))
@@ -479,19 +491,24 @@ impl FromCursor for ColTypeOption {
                 Some(ColTypeOptionValue::CList(Box::new(col_type)))
             }
             ColType::Udt => Some(ColTypeOptionValue::UdtType(CUdt::from_cursor(&mut cursor)?)),
-            ColType::Tuple => {
-                Some(ColTypeOptionValue::TupleType(CTuple::from_cursor(&mut cursor)?))
-            }
+            ColType::Tuple => Some(ColTypeOptionValue::TupleType(CTuple::from_cursor(
+                &mut cursor,
+            )?)),
             ColType::Map => {
                 let name_type = ColTypeOption::from_cursor(&mut cursor)?;
                 let value_type = ColTypeOption::from_cursor(&mut cursor)?;
-                Some(ColTypeOptionValue::CMap((Box::new(name_type), Box::new(value_type))))
+                Some(ColTypeOptionValue::CMap((
+                    Box::new(name_type),
+                    Box::new(value_type),
+                )))
             }
             _ => None,
         };
 
-        Ok(ColTypeOption { id: id,
-                           value: value, })
+        Ok(ColTypeOption {
+            id: id,
+            value: value,
+        })
     }
 }
 
@@ -531,9 +548,11 @@ impl FromCursor for CUdt {
             descriptions.push((name, col_type));
         }
 
-        Ok(CUdt { ks: ks,
-                  udt_name: udt_name,
-                  descriptions: descriptions, })
+        Ok(CUdt {
+            ks: ks,
+            udt_name: udt_name,
+            descriptions: descriptions,
+        })
     }
 }
 
@@ -576,9 +595,11 @@ impl FromCursor for BodyResResultPrepared {
         let metadata = PreparedMetadata::from_cursor(&mut cursor)?;
         let result_metadata = RowsMetadata::from_cursor(&mut cursor)?;
 
-        Ok(BodyResResultPrepared { id: id,
-                                   metadata: metadata,
-                                   result_metadata: result_metadata, })
+        Ok(BodyResResultPrepared {
+            id: id,
+            metadata: metadata,
+            result_metadata: result_metadata,
+        })
     }
 }
 
@@ -603,20 +624,22 @@ impl FromCursor for PreparedMetadata {
             // v4 or v5
             CInt::from_cursor(&mut cursor)?
         };
-        let pk_index_results: Vec<Option<i16>> = (0..pk_count).map(|_| {
-            cursor_next_value(&mut cursor, SHORT_LEN as u64)
+        let pk_index_results: Vec<Option<i16>> = (0..pk_count)
+            .map(|_| {
+                cursor_next_value(&mut cursor, SHORT_LEN as u64)
                     .ok()
                     .and_then(|b| try_i16_from_bytes(b.as_slice()).ok())
-        })
-                                                              .collect();
+            })
+            .collect();
 
         let pk_indexes: Vec<i16> = if pk_index_results.iter().any(Option::is_none) {
             return Err("pk indexes error".into());
         } else {
-            pk_index_results.iter()
-                            .cloned()
-                            .map(|r| r.unwrap())
-                            .collect()
+            pk_index_results
+                .iter()
+                .cloned()
+                .map(|r| r.unwrap())
+                .collect()
         };
         let mut global_table_space: Option<(CString, CString)> = None;
         let has_global_table_space = RowsMetadataFlag::has_global_table_space(flags);
@@ -627,11 +650,13 @@ impl FromCursor for PreparedMetadata {
         }
         let col_specs = ColSpec::parse_colspecs(&mut cursor, columns_count, has_global_table_space);
 
-        Ok(PreparedMetadata { flags: flags,
-                              columns_count: columns_count,
-                              pk_count: pk_count,
-                              pk_indexes: pk_indexes,
-                              global_table_spec: global_table_space,
-                              col_specs: col_specs, })
+        Ok(PreparedMetadata {
+            flags: flags,
+            columns_count: columns_count,
+            pk_count: pk_count,
+            pk_indexes: pk_indexes,
+            global_table_spec: global_table_space,
+            col_specs: col_specs,
+        })
     }
 }
diff --git a/src/frame/frame_startup.rs b/src/frame/frame_startup.rs
index cc24292..40e9e12 100644
--- a/src/frame/frame_startup.rs
+++ b/src/frame/frame_startup.rs
@@ -11,98 +11,98 @@ const COMPRESSION: &'static str = "COMPRESSION";
 
 #[derive(Debug)]
 pub struct BodyReqStartup<'a> {
-  pub map: HashMap<&'static str, &'a str>,
+    pub map: HashMap<&'static str, &'a str>,
 }
 
 impl<'a> BodyReqStartup<'a> {
-  pub fn new<'b>(compression: Option<&'b str>) -> BodyReqStartup<'b> {
-    let mut map = HashMap::new();
-    map.insert(CQL_VERSION, CQL_VERSION_VAL);
-    if let Some(c) = compression {
-      map.insert(COMPRESSION, c);
+    pub fn new<'b>(compression: Option<&'b str>) -> BodyReqStartup<'b> {
+        let mut map = HashMap::new();
+        map.insert(CQL_VERSION, CQL_VERSION_VAL);
+        if let Some(c) = compression {
+            map.insert(COMPRESSION, c);
+        }
+        BodyReqStartup { map: map }
     }
-    BodyReqStartup { map: map }
-  }
 
-  // should be [u8; 2]
-  // Number of key-value pairs
-  fn num(&self) -> Vec<u8> {
-    to_short(self.map.len() as i16)
-  }
+    // should be [u8; 2]
+    // Number of key-value pairs
+    fn num(&self) -> Vec<u8> {
+        to_short(self.map.len() as i16)
+    }
 }
 
 impl<'a> IntoBytes for BodyReqStartup<'a> {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v = vec![];
-    // push number of key-value pairs
-    v.extend_from_slice(&self.num().as_slice());
-    for (key, val) in self.map.iter() {
-      // push key len
-      v.extend_from_slice(to_short(key.len() as i16).as_slice());
-      // push key itself
-      v.extend_from_slice(key.as_bytes());
-      // push val len
-      v.extend_from_slice(to_short(val.len() as i16).as_slice());
-      // push val itself
-      v.extend_from_slice(val.as_bytes());
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v = vec![];
+        // push number of key-value pairs
+        v.extend_from_slice(&self.num().as_slice());
+        for (key, val) in self.map.iter() {
+            // push key len
+            v.extend_from_slice(to_short(key.len() as i16).as_slice());
+            // push key itself
+            v.extend_from_slice(key.as_bytes());
+            // push val len
+            v.extend_from_slice(to_short(val.len() as i16).as_slice());
+            // push val itself
+            v.extend_from_slice(val.as_bytes());
+        }
+        v
     }
-    v
-  }
 }
 
 // Frame implementation related to BodyReqStartup
 
 impl Frame {
-  /// Creates new frame of type `startup`.
-  pub fn new_req_startup(compression: Option<&str>) -> Frame {
-    let version = Version::Request;
-    let flag = Flag::Ignore;
-    let stream = rand::random::<u16>();
-    let opcode = Opcode::Startup;
-    let body = BodyReqStartup::new(compression);
+    /// Creates new frame of type `startup`.
+    pub fn new_req_startup(compression: Option<&str>) -> Frame {
+        let version = Version::Request;
+        let flag = Flag::Ignore;
+        let stream = rand::random::<u16>();
+        let opcode = Opcode::Startup;
+        let body = BodyReqStartup::new(compression);
 
-    Frame {
-      version: version,
-      flags: vec![flag],
-      stream: stream,
-      opcode: opcode,
-      body: body.into_cbytes(),
-      // for request frames it's always None
-      tracing_id: None,
-      warnings: vec![],
+        Frame {
+            version: version,
+            flags: vec![flag],
+            stream: stream,
+            opcode: opcode,
+            body: body.into_cbytes(),
+            // for request frames it's always None
+            tracing_id: None,
+            warnings: vec![],
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod test {
-  use super::*;
-  use crate::frame::{Flag, Frame, Opcode, Version};
+    use super::*;
+    use crate::frame::{Flag, Frame, Opcode, Version};
 
-  #[test]
-  fn new_body_req_startup_some_compression() {
-    let compression = "test_compression";
-    let body = BodyReqStartup::new(Some(compression));
-    assert_eq!(body.map.get("CQL_VERSION"), Some(&"3.0.0"));
-    assert_eq!(body.map.get("COMPRESSION"), Some(&compression));
-    assert_eq!(body.map.len(), 2);
-  }
+    #[test]
+    fn new_body_req_startup_some_compression() {
+        let compression = "test_compression";
+        let body = BodyReqStartup::new(Some(compression));
+        assert_eq!(body.map.get("CQL_VERSION"), Some(&"3.0.0"));
+        assert_eq!(body.map.get("COMPRESSION"), Some(&compression));
+        assert_eq!(body.map.len(), 2);
+    }
 
-  #[test]
-  fn new_body_req_startup_none_compression() {
-    let body = BodyReqStartup::new(None);
-    assert_eq!(body.map.get("CQL_VERSION"), Some(&"3.0.0"));
-    assert_eq!(body.map.len(), 1);
-  }
+    #[test]
+    fn new_body_req_startup_none_compression() {
+        let body = BodyReqStartup::new(None);
+        assert_eq!(body.map.get("CQL_VERSION"), Some(&"3.0.0"));
+        assert_eq!(body.map.len(), 1);
+    }
 
-  #[test]
-  fn new_req_startup() {
-    let compression = Some("test_compression");
-    let frame = Frame::new_req_startup(compression);
-    assert_eq!(frame.version, Version::Request);
-    assert_eq!(frame.flags, vec![Flag::Ignore]);
-    assert_eq!(frame.opcode, Opcode::Startup);
-    assert_eq!(frame.tracing_id, None);
-    assert_eq!(frame.warnings, vec![] as Vec<String>);
-  }
+    #[test]
+    fn new_req_startup() {
+        let compression = Some("test_compression");
+        let frame = Frame::new_req_startup(compression);
+        assert_eq!(frame.version, Version::Request);
+        assert_eq!(frame.flags, vec![Flag::Ignore]);
+        assert_eq!(frame.opcode, Opcode::Startup);
+        assert_eq!(frame.tracing_id, None);
+        assert_eq!(frame.warnings, vec![] as Vec<String>);
+    }
 }
diff --git a/src/frame/frame_supported.rs b/src/frame/frame_supported.rs
index 50ae3e0..b0b7b6f 100644
--- a/src/frame/frame_supported.rs
+++ b/src/frame/frame_supported.rs
@@ -7,42 +7,43 @@ use crate::types::{cursor_next_value, try_from_bytes, CString, CStringList, SHOR
 
 #[derive(Debug)]
 pub struct BodyResSupported {
-  pub data: HashMap<String, Vec<String>>,
+    pub data: HashMap<String, Vec<String>>,
 }
 
 impl FromCursor for BodyResSupported {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResSupported> {
-    let l = try_from_bytes(cursor_next_value(&mut cursor, SHORT_LEN as u64)?.as_slice())? as usize;
-    let mut data: HashMap<String, Vec<String>> = HashMap::with_capacity(l);
-    for _ in 0..l {
-      let name = CString::from_cursor(&mut cursor)?.into_plain();
-      let val = CStringList::from_cursor(&mut cursor)?.into_plain();
-      data.insert(name, val);
-    }
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> error::Result<BodyResSupported> {
+        let l =
+            try_from_bytes(cursor_next_value(&mut cursor, SHORT_LEN as u64)?.as_slice())? as usize;
+        let mut data: HashMap<String, Vec<String>> = HashMap::with_capacity(l);
+        for _ in 0..l {
+            let name = CString::from_cursor(&mut cursor)?.into_plain();
+            let val = CStringList::from_cursor(&mut cursor)?.into_plain();
+            data.insert(name, val);
+        }
 
-    Ok(BodyResSupported { data: data })
-  }
+        Ok(BodyResSupported { data: data })
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::FromCursor;
-  use std::io::Cursor;
+    use super::*;
+    use crate::frame::traits::FromCursor;
+    use std::io::Cursor;
 
-  #[test]
-  fn test_name() {
-    let bytes = [
-      0, 1, // n options
-      // 1-st option
-      0, 2, 97, 98, // key [string] "ab"
-      0, 2, 0, 1, 97, 0, 1, 98, /* value ["a", "b"] */
-    ];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(&bytes);
-    let options = BodyResSupported::from_cursor(&mut cursor).unwrap().data;
-    assert_eq!(options.len(), 1);
-    let option_ab = options.get(&"ab".to_string()).unwrap();
-    assert_eq!(option_ab[0], "a".to_string());
-    assert_eq!(option_ab[1], "b".to_string());
-  }
+    #[test]
+    fn test_name() {
+        let bytes = [
+            0, 1, // n options
+            // 1-st option
+            0, 2, 97, 98, // key [string] "ab"
+            0, 2, 0, 1, 97, 0, 1, 98, /* value ["a", "b"] */
+        ];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(&bytes);
+        let options = BodyResSupported::from_cursor(&mut cursor).unwrap().data;
+        assert_eq!(options.len(), 1);
+        let option_ab = options.get(&"ab".to_string()).unwrap();
+        assert_eq!(option_ab[0], "a".to_string());
+        assert_eq!(option_ab[1], "b".to_string());
+    }
 }
diff --git a/src/frame/mod.rs b/src/frame/mod.rs
index 37073ca..87d5234 100644
--- a/src/frame/mod.rs
+++ b/src/frame/mod.rs
@@ -35,461 +35,461 @@ use crate::error;
 
 #[derive(Debug)]
 pub struct Frame {
-  pub version: Version,
-  pub flags: Vec<Flag>,
-  pub opcode: Opcode,
-  pub stream: u16,
-  pub body: Vec<u8>,
-  pub tracing_id: Option<Uuid>,
-  pub warnings: Vec<String>,
+    pub version: Version,
+    pub flags: Vec<Flag>,
+    pub opcode: Opcode,
+    pub stream: u16,
+    pub body: Vec<u8>,
+    pub tracing_id: Option<Uuid>,
+    pub warnings: Vec<String>,
 }
 
 impl Frame {
-  pub fn get_body(&self) -> error::Result<ResponseBody> {
-    ResponseBody::from(self.body.as_slice(), &self.opcode)
-  }
-
-  pub fn tracing_id(&self) -> &Option<Uuid> {
-    &self.tracing_id
-  }
-
-  pub fn warnings(&self) -> &Vec<String> {
-    &self.warnings
-  }
-
-  pub fn encode_with(self, compressor: Compression) -> error::Result<Vec<u8>> {
-    let mut v = vec![];
-
-    let version_bytes = self.version.as_byte();
-    let flag_bytes = Flag::many_to_cbytes(&self.flags);
-    let opcode_bytes = self.opcode.as_byte();
-    let encoded_body = compressor.encode(self.body)?;
-    let body_len = encoded_body.len();
-
-    v.push(version_bytes);
-    v.push(flag_bytes);
-    v.extend_from_slice(to_n_bytes(self.stream as u64, STREAM_LEN).as_slice());
-    v.push(opcode_bytes);
-    v.extend_from_slice(to_n_bytes(body_len as u64, LENGTH_LEN).as_slice());
-    v.extend_from_slice(encoded_body.as_slice());
-
-    Ok(v)
-  }
+    pub fn get_body(&self) -> error::Result<ResponseBody> {
+        ResponseBody::from(self.body.as_slice(), &self.opcode)
+    }
+
+    pub fn tracing_id(&self) -> &Option<Uuid> {
+        &self.tracing_id
+    }
+
+    pub fn warnings(&self) -> &Vec<String> {
+        &self.warnings
+    }
+
+    pub fn encode_with(self, compressor: Compression) -> error::Result<Vec<u8>> {
+        let mut v = vec![];
+
+        let version_bytes = self.version.as_byte();
+        let flag_bytes = Flag::many_to_cbytes(&self.flags);
+        let opcode_bytes = self.opcode.as_byte();
+        let encoded_body = compressor.encode(self.body)?;
+        let body_len = encoded_body.len();
+
+        v.push(version_bytes);
+        v.push(flag_bytes);
+        v.extend_from_slice(to_n_bytes(self.stream as u64, STREAM_LEN).as_slice());
+        v.push(opcode_bytes);
+        v.extend_from_slice(to_n_bytes(body_len as u64, LENGTH_LEN).as_slice());
+        v.extend_from_slice(encoded_body.as_slice());
+
+        Ok(v)
+    }
 }
 
 impl<'a> IntoBytes for Frame {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v = vec![];
-
-    let version_bytes = self.version.as_byte();
-    let flag_bytes = Flag::many_to_cbytes(&self.flags);
-    let opcode_bytes = self.opcode.as_byte();
-    let body_len = self.body.len();
-
-    v.push(version_bytes);
-    v.push(flag_bytes);
-    v.extend_from_slice(to_n_bytes(self.stream as u64, STREAM_LEN).as_slice());
-    v.push(opcode_bytes);
-    v.extend_from_slice(to_n_bytes(body_len as u64, LENGTH_LEN).as_slice());
-    v.extend_from_slice(self.body.as_slice());
-
-    v
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v = vec![];
+
+        let version_bytes = self.version.as_byte();
+        let flag_bytes = Flag::many_to_cbytes(&self.flags);
+        let opcode_bytes = self.opcode.as_byte();
+        let body_len = self.body.len();
+
+        v.push(version_bytes);
+        v.push(flag_bytes);
+        v.extend_from_slice(to_n_bytes(self.stream as u64, STREAM_LEN).as_slice());
+        v.push(opcode_bytes);
+        v.extend_from_slice(to_n_bytes(body_len as u64, LENGTH_LEN).as_slice());
+        v.extend_from_slice(self.body.as_slice());
+
+        v
+    }
 }
 
 /// Frame's version
 #[derive(Debug, PartialEq)]
 pub enum Version {
-  Request,
-  Response,
+    Request,
+    Response,
 }
 
 impl Version {
-  /// Number of bytes that represent Cassandra frame's version.
-  pub const BYTE_LENGTH: usize = 1;
-
-  /// It returns an actual Cassandra request frame version that CDRS can work with.
-  /// This version is based on selected feature - on of `v3`, `v4` or `v5`.
-  fn request_version() -> u8 {
-    if cfg!(feature = "v3") {
-      0x03
-    } else if cfg!(feature = "v4") || cfg!(feature = "v5") {
-      0x04
-    } else {
-      panic!(
-        "{}",
-        "Protocol version is not supported. CDRS should be run with protocol feature \
-         set to v3, v4 or v5"
-      );
+    /// Number of bytes that represent Cassandra frame's version.
+    pub const BYTE_LENGTH: usize = 1;
+
+    /// It returns an actual Cassandra request frame version that CDRS can work with.
+    /// This version is based on selected feature - on of `v3`, `v4` or `v5`.
+    fn request_version() -> u8 {
+        if cfg!(feature = "v3") {
+            0x03
+        } else if cfg!(feature = "v4") || cfg!(feature = "v5") {
+            0x04
+        } else {
+            panic!(
+                "{}",
+                "Protocol version is not supported. CDRS should be run with protocol feature \
+                 set to v3, v4 or v5"
+            );
+        }
     }
-  }
-
-  /// It returns an actual Cassandra response frame version that CDRS can work with.
-  /// This version is based on selected feature - on of `v3`, `v4` or `v5`.
-  fn response_version() -> u8 {
-    if cfg!(feature = "v3") {
-      0x83
-    } else if cfg!(feature = "v4") || cfg!(feature = "v5") {
-      0x84
-    } else {
-      panic!(
-        "{}",
-        "Protocol version is not supported. CDRS should be run with protocol feature \
-         set to v3, v4 or v5"
-      );
+
+    /// It returns an actual Cassandra response frame version that CDRS can work with.
+    /// This version is based on selected feature - on of `v3`, `v4` or `v5`.
+    fn response_version() -> u8 {
+        if cfg!(feature = "v3") {
+            0x83
+        } else if cfg!(feature = "v4") || cfg!(feature = "v5") {
+            0x84
+        } else {
+            panic!(
+                "{}",
+                "Protocol version is not supported. CDRS should be run with protocol feature \
+                 set to v3, v4 or v5"
+            );
+        }
     }
-  }
 }
 
 impl AsByte for Version {
-  fn as_byte(&self) -> u8 {
-    match self {
-      &Version::Request => Version::request_version(),
-      &Version::Response => Version::response_version(),
+    fn as_byte(&self) -> u8 {
+        match self {
+            &Version::Request => Version::request_version(),
+            &Version::Response => Version::response_version(),
+        }
     }
-  }
 }
 
 impl From<Vec<u8>> for Version {
-  fn from(v: Vec<u8>) -> Version {
-    if v.len() != Self::BYTE_LENGTH {
-      error!(
-        "Unexpected Cassandra verion. Should has {} byte(-s), got {:?}",
-        Self::BYTE_LENGTH,
-        v
-      );
-      panic!(
-        "Unexpected Cassandra verion. Should has {} byte(-s), got {:?}",
-        Self::BYTE_LENGTH,
-        v
-      );
-    }
-    let version = v[0];
-    let req = Version::request_version();
-    let res = Version::response_version();
-
-    if version == req {
-      Version::Request
-    } else if version == res {
-      Version::Response
-    } else {
-      error!(
-        "Unexpected Cassandra version {:?}, either {:?} or {:?} is expected",
-        version, req, res
-      );
-      panic!(
-        "Unexpected Cassandra version {:?}, either {:?} or {:?} is expected",
-        version, req, res
-      );
+    fn from(v: Vec<u8>) -> Version {
+        if v.len() != Self::BYTE_LENGTH {
+            error!(
+                "Unexpected Cassandra verion. Should has {} byte(-s), got {:?}",
+                Self::BYTE_LENGTH,
+                v
+            );
+            panic!(
+                "Unexpected Cassandra verion. Should has {} byte(-s), got {:?}",
+                Self::BYTE_LENGTH,
+                v
+            );
+        }
+        let version = v[0];
+        let req = Version::request_version();
+        let res = Version::response_version();
+
+        if version == req {
+            Version::Request
+        } else if version == res {
+            Version::Response
+        } else {
+            error!(
+                "Unexpected Cassandra version {:?}, either {:?} or {:?} is expected",
+                version, req, res
+            );
+            panic!(
+                "Unexpected Cassandra version {:?}, either {:?} or {:?} is expected",
+                version, req, res
+            );
+        }
     }
-  }
 }
 
 /// Frame's flag
 // Is not implemented functionality. Only Igonore works for now
 #[derive(Debug, PartialEq)]
 pub enum Flag {
-  Compression,
-  Tracing,
-  CustomPayload,
-  Warning,
-  Ignore,
+    Compression,
+    Tracing,
+    CustomPayload,
+    Warning,
+    Ignore,
 }
 
 impl Flag {
-  /// Number of flag bytes in accordance to protocol.
-  const BYTE_LENGTH: usize = 1;
+    /// Number of flag bytes in accordance to protocol.
+    const BYTE_LENGTH: usize = 1;
 
-  /// It returns selected flags collection.
-  pub fn get_collection(flags: u8) -> Vec<Flag> {
-    let mut found_flags: Vec<Flag> = vec![];
+    /// It returns selected flags collection.
+    pub fn get_collection(flags: u8) -> Vec<Flag> {
+        let mut found_flags: Vec<Flag> = vec![];
+
+        if Flag::has_compression(flags) {
+            found_flags.push(Flag::Compression);
+        }
+
+        if Flag::has_tracing(flags) {
+            found_flags.push(Flag::Tracing);
+        }
+
+        if Flag::has_custom_payload(flags) {
+            found_flags.push(Flag::CustomPayload);
+        }
+
+        if Flag::has_warning(flags) {
+            found_flags.push(Flag::Warning);
+        }
+
+        found_flags
+    }
 
-    if Flag::has_compression(flags) {
-      found_flags.push(Flag::Compression);
+    /// The method converts a serie of `Flag`-s into a single byte.
+    pub fn many_to_cbytes(flags: &Vec<Flag>) -> u8 {
+        flags
+            .iter()
+            .fold(Flag::Ignore.as_byte(), |acc, f| acc | f.as_byte())
     }
 
-    if Flag::has_tracing(flags) {
-      found_flags.push(Flag::Tracing);
+    /// Indicates if flags contains `Flag::Compression`
+    pub fn has_compression(flags: u8) -> bool {
+        (flags & Flag::Compression.as_byte()) > 0
     }
 
-    if Flag::has_custom_payload(flags) {
-      found_flags.push(Flag::CustomPayload);
+    /// Indicates if flags contains `Flag::Tracing`
+    pub fn has_tracing(flags: u8) -> bool {
+        (flags & Flag::Tracing.as_byte()) > 0
     }
 
-    if Flag::has_warning(flags) {
-      found_flags.push(Flag::Warning);
+    /// Indicates if flags contains `Flag::CustomPayload`
+    pub fn has_custom_payload(flags: u8) -> bool {
+        (flags & Flag::CustomPayload.as_byte()) > 0
     }
 
-    found_flags
-  }
-
-  /// The method converts a serie of `Flag`-s into a single byte.
-  pub fn many_to_cbytes(flags: &Vec<Flag>) -> u8 {
-    flags
-      .iter()
-      .fold(Flag::Ignore.as_byte(), |acc, f| acc | f.as_byte())
-  }
-
-  /// Indicates if flags contains `Flag::Compression`
-  pub fn has_compression(flags: u8) -> bool {
-    (flags & Flag::Compression.as_byte()) > 0
-  }
-
-  /// Indicates if flags contains `Flag::Tracing`
-  pub fn has_tracing(flags: u8) -> bool {
-    (flags & Flag::Tracing.as_byte()) > 0
-  }
-
-  /// Indicates if flags contains `Flag::CustomPayload`
-  pub fn has_custom_payload(flags: u8) -> bool {
-    (flags & Flag::CustomPayload.as_byte()) > 0
-  }
-
-  /// Indicates if flags contains `Flag::Warning`
-  pub fn has_warning(flags: u8) -> bool {
-    (flags & Flag::Warning.as_byte()) > 0
-  }
+    /// Indicates if flags contains `Flag::Warning`
+    pub fn has_warning(flags: u8) -> bool {
+        (flags & Flag::Warning.as_byte()) > 0
+    }
 }
 
 impl AsByte for Flag {
-  fn as_byte(&self) -> u8 {
-    match self {
-      &Flag::Compression => 0x01,
-      &Flag::Tracing => 0x02,
-      &Flag::CustomPayload => 0x04,
-      &Flag::Warning => 0x08,
-      &Flag::Ignore => 0x00,
-      // assuming that ingoring value whould be other than [0x01, 0x02, 0x04, 0x08]
+    fn as_byte(&self) -> u8 {
+        match self {
+            &Flag::Compression => 0x01,
+            &Flag::Tracing => 0x02,
+            &Flag::CustomPayload => 0x04,
+            &Flag::Warning => 0x08,
+            &Flag::Ignore => 0x00,
+            // assuming that ingoring value whould be other than [0x01, 0x02, 0x04, 0x08]
+        }
     }
-  }
 }
 
 impl From<u8> for Flag {
-  fn from(f: u8) -> Flag {
-    match f {
-      0x01 => Flag::Compression,
-      0x02 => Flag::Tracing,
-      0x04 => Flag::CustomPayload,
-      0x08 => Flag::Warning,
-      _ => Flag::Ignore, // ignore by specification
+    fn from(f: u8) -> Flag {
+        match f {
+            0x01 => Flag::Compression,
+            0x02 => Flag::Tracing,
+            0x04 => Flag::CustomPayload,
+            0x08 => Flag::Warning,
+            _ => Flag::Ignore, // ignore by specification
+        }
     }
-  }
 }
 
 #[derive(Debug, PartialEq)]
 pub enum Opcode {
-  Error,
-  Startup,
-  Ready,
-  Authenticate,
-  Options,
-  Supported,
-  Query,
-  Result,
-  Prepare,
-  Execute,
-  Register,
-  Event,
-  Batch,
-  AuthChallenge,
-  AuthResponse,
-  AuthSuccess,
+    Error,
+    Startup,
+    Ready,
+    Authenticate,
+    Options,
+    Supported,
+    Query,
+    Result,
+    Prepare,
+    Execute,
+    Register,
+    Event,
+    Batch,
+    AuthChallenge,
+    AuthResponse,
+    AuthSuccess,
 }
 
 impl Opcode {
-  // Number of opcode bytes in accordance to protocol.
-  pub const BYTE_LENGTH: usize = 1;
+    // Number of opcode bytes in accordance to protocol.
+    pub const BYTE_LENGTH: usize = 1;
 }
 
 impl AsByte for Opcode {
-  fn as_byte(&self) -> u8 {
-    match self {
-      &Opcode::Error => 0x00,
-      &Opcode::Startup => 0x01,
-      &Opcode::Ready => 0x02,
-      &Opcode::Authenticate => 0x03,
-      &Opcode::Options => 0x05,
-      &Opcode::Supported => 0x06,
-      &Opcode::Query => 0x07,
-      &Opcode::Result => 0x08,
-      &Opcode::Prepare => 0x09,
-      &Opcode::Execute => 0x0A,
-      &Opcode::Register => 0x0B,
-      &Opcode::Event => 0x0C,
-      &Opcode::Batch => 0x0D,
-      &Opcode::AuthChallenge => 0x0E,
-      &Opcode::AuthResponse => 0x0F,
-      &Opcode::AuthSuccess => 0x10,
+    fn as_byte(&self) -> u8 {
+        match self {
+            &Opcode::Error => 0x00,
+            &Opcode::Startup => 0x01,
+            &Opcode::Ready => 0x02,
+            &Opcode::Authenticate => 0x03,
+            &Opcode::Options => 0x05,
+            &Opcode::Supported => 0x06,
+            &Opcode::Query => 0x07,
+            &Opcode::Result => 0x08,
+            &Opcode::Prepare => 0x09,
+            &Opcode::Execute => 0x0A,
+            &Opcode::Register => 0x0B,
+            &Opcode::Event => 0x0C,
+            &Opcode::Batch => 0x0D,
+            &Opcode::AuthChallenge => 0x0E,
+            &Opcode::AuthResponse => 0x0F,
+            &Opcode::AuthSuccess => 0x10,
+        }
     }
-  }
 }
 
 impl From<u8> for Opcode {
-  fn from(b: u8) -> Opcode {
-    match b {
-      0x00 => Opcode::Error,
-      0x01 => Opcode::Startup,
-      0x02 => Opcode::Ready,
-      0x03 => Opcode::Authenticate,
-      0x05 => Opcode::Options,
-      0x06 => Opcode::Supported,
-      0x07 => Opcode::Query,
-      0x08 => Opcode::Result,
-      0x09 => Opcode::Prepare,
-      0x0A => Opcode::Execute,
-      0x0B => Opcode::Register,
-      0x0C => Opcode::Event,
-      0x0D => Opcode::Batch,
-      0x0E => Opcode::AuthChallenge,
-      0x0F => Opcode::AuthResponse,
-      0x10 => Opcode::AuthSuccess,
-      _ => unreachable!(),
+    fn from(b: u8) -> Opcode {
+        match b {
+            0x00 => Opcode::Error,
+            0x01 => Opcode::Startup,
+            0x02 => Opcode::Ready,
+            0x03 => Opcode::Authenticate,
+            0x05 => Opcode::Options,
+            0x06 => Opcode::Supported,
+            0x07 => Opcode::Query,
+            0x08 => Opcode::Result,
+            0x09 => Opcode::Prepare,
+            0x0A => Opcode::Execute,
+            0x0B => Opcode::Register,
+            0x0C => Opcode::Event,
+            0x0D => Opcode::Batch,
+            0x0E => Opcode::AuthChallenge,
+            0x0F => Opcode::AuthResponse,
+            0x10 => Opcode::AuthSuccess,
+            _ => unreachable!(),
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::AsByte;
-
-  #[test]
-  #[cfg(not(feature = "v3"))]
-  fn test_frame_version_as_byte() {
-    let request_version = Version::Request;
-    assert_eq!(request_version.as_byte(), 0x04);
-    let response_version = Version::Response;
-    assert_eq!(response_version.as_byte(), 0x84);
-  }
-
-  #[test]
-  #[cfg(feature = "v3")]
-  fn test_frame_version_as_byte_v3() {
-    let request_version = Version::Request;
-    assert_eq!(request_version.as_byte(), 0x03);
-    let response_version = Version::Response;
-    assert_eq!(response_version.as_byte(), 0x83);
-  }
-
-  #[test]
-  #[cfg(not(feature = "v3"))]
-  fn test_frame_version_from() {
-    let request: Vec<u8> = vec![0x04];
-    assert_eq!(Version::from(request), Version::Request);
-    let response: Vec<u8> = vec![0x84];
-    assert_eq!(Version::from(response), Version::Response);
-  }
-
-  #[test]
-  #[cfg(feature = "v3")]
-  fn test_frame_version_from_v3() {
-    let request: Vec<u8> = vec![0x03];
-    assert_eq!(Version::from(request), Version::Request);
-    let response: Vec<u8> = vec![0x83];
-    assert_eq!(Version::from(response), Version::Response);
-  }
-
-  #[test]
-  fn test_flag_from() {
-    assert_eq!(Flag::from(0x01 as u8), Flag::Compression);
-    assert_eq!(Flag::from(0x02 as u8), Flag::Tracing);
-    assert_eq!(Flag::from(0x04 as u8), Flag::CustomPayload);
-    assert_eq!(Flag::from(0x08 as u8), Flag::Warning);
-    // rest should be interpreted as Ignore
-    assert_eq!(Flag::from(0x10 as u8), Flag::Ignore);
-    assert_eq!(Flag::from(0x31 as u8), Flag::Ignore);
-  }
-
-  #[test]
-  fn test_flag_as_byte() {
-    assert_eq!(Flag::Compression.as_byte(), 0x01);
-    assert_eq!(Flag::Tracing.as_byte(), 0x02);
-    assert_eq!(Flag::CustomPayload.as_byte(), 0x04);
-    assert_eq!(Flag::Warning.as_byte(), 0x08);
-  }
-
-  #[test]
-  fn test_flag_has_x() {
-    assert!(Flag::has_compression(0x01));
-    assert!(!Flag::has_compression(0x02));
-
-    assert!(Flag::has_tracing(0x02));
-    assert!(!Flag::has_tracing(0x01));
-
-    assert!(Flag::has_custom_payload(0x04));
-    assert!(!Flag::has_custom_payload(0x02));
-
-    assert!(Flag::has_warning(0x08));
-    assert!(!Flag::has_warning(0x01));
-  }
-
-  #[test]
-  fn test_flag_many_to_cbytes() {
-    let all = vec![
-      Flag::Compression,
-      Flag::Tracing,
-      Flag::CustomPayload,
-      Flag::Warning,
-    ];
-    assert_eq!(Flag::many_to_cbytes(&all), 1 | 2 | 4 | 8);
-    let some = vec![Flag::Compression, Flag::Warning];
-    assert_eq!(Flag::many_to_cbytes(&some), 1 | 8);
-    let one = vec![Flag::Compression];
-    assert_eq!(Flag::many_to_cbytes(&one), 1);
-  }
-
-  #[test]
-  fn test_flag_get_collection() {
-    let all = vec![
-      Flag::Compression,
-      Flag::Tracing,
-      Flag::CustomPayload,
-      Flag::Warning,
-    ];
-    assert_eq!(Flag::get_collection(1 | 2 | 4 | 8), all);
-    let some = vec![Flag::Compression, Flag::Warning];
-    assert_eq!(Flag::get_collection(1 | 8), some);
-    let one = vec![Flag::Compression];
-    assert_eq!(Flag::get_collection(1), one);
-  }
-
-  #[test]
-  fn test_opcode_as_byte() {
-    assert_eq!(Opcode::Error.as_byte(), 0x00);
-    assert_eq!(Opcode::Startup.as_byte(), 0x01);
-    assert_eq!(Opcode::Ready.as_byte(), 0x02);
-    assert_eq!(Opcode::Authenticate.as_byte(), 0x03);
-    assert_eq!(Opcode::Options.as_byte(), 0x05);
-    assert_eq!(Opcode::Supported.as_byte(), 0x06);
-    assert_eq!(Opcode::Query.as_byte(), 0x07);
-    assert_eq!(Opcode::Result.as_byte(), 0x08);
-    assert_eq!(Opcode::Prepare.as_byte(), 0x09);
-    assert_eq!(Opcode::Execute.as_byte(), 0x0A);
-    assert_eq!(Opcode::Register.as_byte(), 0x0B);
-    assert_eq!(Opcode::Event.as_byte(), 0x0C);
-    assert_eq!(Opcode::Batch.as_byte(), 0x0D);
-    assert_eq!(Opcode::AuthChallenge.as_byte(), 0x0E);
-    assert_eq!(Opcode::AuthResponse.as_byte(), 0x0F);
-    assert_eq!(Opcode::AuthSuccess.as_byte(), 0x10);
-  }
-
-  #[test]
-  fn test_opcode_from() {
-    assert_eq!(Opcode::from(0x00), Opcode::Error);
-    assert_eq!(Opcode::from(0x01), Opcode::Startup);
-    assert_eq!(Opcode::from(0x02), Opcode::Ready);
-    assert_eq!(Opcode::from(0x03), Opcode::Authenticate);
-    assert_eq!(Opcode::from(0x05), Opcode::Options);
-    assert_eq!(Opcode::from(0x06), Opcode::Supported);
-    assert_eq!(Opcode::from(0x07), Opcode::Query);
-    assert_eq!(Opcode::from(0x08), Opcode::Result);
-    assert_eq!(Opcode::from(0x09), Opcode::Prepare);
-    assert_eq!(Opcode::from(0x0A), Opcode::Execute);
-    assert_eq!(Opcode::from(0x0B), Opcode::Register);
-    assert_eq!(Opcode::from(0x0C), Opcode::Event);
-    assert_eq!(Opcode::from(0x0D), Opcode::Batch);
-    assert_eq!(Opcode::from(0x0E), Opcode::AuthChallenge);
-    assert_eq!(Opcode::from(0x0F), Opcode::AuthResponse);
-    assert_eq!(Opcode::from(0x10), Opcode::AuthSuccess);
-  }
+    use super::*;
+    use crate::frame::traits::AsByte;
+
+    #[test]
+    #[cfg(not(feature = "v3"))]
+    fn test_frame_version_as_byte() {
+        let request_version = Version::Request;
+        assert_eq!(request_version.as_byte(), 0x04);
+        let response_version = Version::Response;
+        assert_eq!(response_version.as_byte(), 0x84);
+    }
+
+    #[test]
+    #[cfg(feature = "v3")]
+    fn test_frame_version_as_byte_v3() {
+        let request_version = Version::Request;
+        assert_eq!(request_version.as_byte(), 0x03);
+        let response_version = Version::Response;
+        assert_eq!(response_version.as_byte(), 0x83);
+    }
+
+    #[test]
+    #[cfg(not(feature = "v3"))]
+    fn test_frame_version_from() {
+        let request: Vec<u8> = vec![0x04];
+        assert_eq!(Version::from(request), Version::Request);
+        let response: Vec<u8> = vec![0x84];
+        assert_eq!(Version::from(response), Version::Response);
+    }
+
+    #[test]
+    #[cfg(feature = "v3")]
+    fn test_frame_version_from_v3() {
+        let request: Vec<u8> = vec![0x03];
+        assert_eq!(Version::from(request), Version::Request);
+        let response: Vec<u8> = vec![0x83];
+        assert_eq!(Version::from(response), Version::Response);
+    }
+
+    #[test]
+    fn test_flag_from() {
+        assert_eq!(Flag::from(0x01 as u8), Flag::Compression);
+        assert_eq!(Flag::from(0x02 as u8), Flag::Tracing);
+        assert_eq!(Flag::from(0x04 as u8), Flag::CustomPayload);
+        assert_eq!(Flag::from(0x08 as u8), Flag::Warning);
+        // rest should be interpreted as Ignore
+        assert_eq!(Flag::from(0x10 as u8), Flag::Ignore);
+        assert_eq!(Flag::from(0x31 as u8), Flag::Ignore);
+    }
+
+    #[test]
+    fn test_flag_as_byte() {
+        assert_eq!(Flag::Compression.as_byte(), 0x01);
+        assert_eq!(Flag::Tracing.as_byte(), 0x02);
+        assert_eq!(Flag::CustomPayload.as_byte(), 0x04);
+        assert_eq!(Flag::Warning.as_byte(), 0x08);
+    }
+
+    #[test]
+    fn test_flag_has_x() {
+        assert!(Flag::has_compression(0x01));
+        assert!(!Flag::has_compression(0x02));
+
+        assert!(Flag::has_tracing(0x02));
+        assert!(!Flag::has_tracing(0x01));
+
+        assert!(Flag::has_custom_payload(0x04));
+        assert!(!Flag::has_custom_payload(0x02));
+
+        assert!(Flag::has_warning(0x08));
+        assert!(!Flag::has_warning(0x01));
+    }
+
+    #[test]
+    fn test_flag_many_to_cbytes() {
+        let all = vec![
+            Flag::Compression,
+            Flag::Tracing,
+            Flag::CustomPayload,
+            Flag::Warning,
+        ];
+        assert_eq!(Flag::many_to_cbytes(&all), 1 | 2 | 4 | 8);
+        let some = vec![Flag::Compression, Flag::Warning];
+        assert_eq!(Flag::many_to_cbytes(&some), 1 | 8);
+        let one = vec![Flag::Compression];
+        assert_eq!(Flag::many_to_cbytes(&one), 1);
+    }
+
+    #[test]
+    fn test_flag_get_collection() {
+        let all = vec![
+            Flag::Compression,
+            Flag::Tracing,
+            Flag::CustomPayload,
+            Flag::Warning,
+        ];
+        assert_eq!(Flag::get_collection(1 | 2 | 4 | 8), all);
+        let some = vec![Flag::Compression, Flag::Warning];
+        assert_eq!(Flag::get_collection(1 | 8), some);
+        let one = vec![Flag::Compression];
+        assert_eq!(Flag::get_collection(1), one);
+    }
+
+    #[test]
+    fn test_opcode_as_byte() {
+        assert_eq!(Opcode::Error.as_byte(), 0x00);
+        assert_eq!(Opcode::Startup.as_byte(), 0x01);
+        assert_eq!(Opcode::Ready.as_byte(), 0x02);
+        assert_eq!(Opcode::Authenticate.as_byte(), 0x03);
+        assert_eq!(Opcode::Options.as_byte(), 0x05);
+        assert_eq!(Opcode::Supported.as_byte(), 0x06);
+        assert_eq!(Opcode::Query.as_byte(), 0x07);
+        assert_eq!(Opcode::Result.as_byte(), 0x08);
+        assert_eq!(Opcode::Prepare.as_byte(), 0x09);
+        assert_eq!(Opcode::Execute.as_byte(), 0x0A);
+        assert_eq!(Opcode::Register.as_byte(), 0x0B);
+        assert_eq!(Opcode::Event.as_byte(), 0x0C);
+        assert_eq!(Opcode::Batch.as_byte(), 0x0D);
+        assert_eq!(Opcode::AuthChallenge.as_byte(), 0x0E);
+        assert_eq!(Opcode::AuthResponse.as_byte(), 0x0F);
+        assert_eq!(Opcode::AuthSuccess.as_byte(), 0x10);
+    }
+
+    #[test]
+    fn test_opcode_from() {
+        assert_eq!(Opcode::from(0x00), Opcode::Error);
+        assert_eq!(Opcode::from(0x01), Opcode::Startup);
+        assert_eq!(Opcode::from(0x02), Opcode::Ready);
+        assert_eq!(Opcode::from(0x03), Opcode::Authenticate);
+        assert_eq!(Opcode::from(0x05), Opcode::Options);
+        assert_eq!(Opcode::from(0x06), Opcode::Supported);
+        assert_eq!(Opcode::from(0x07), Opcode::Query);
+        assert_eq!(Opcode::from(0x08), Opcode::Result);
+        assert_eq!(Opcode::from(0x09), Opcode::Prepare);
+        assert_eq!(Opcode::from(0x0A), Opcode::Execute);
+        assert_eq!(Opcode::from(0x0B), Opcode::Register);
+        assert_eq!(Opcode::from(0x0C), Opcode::Event);
+        assert_eq!(Opcode::from(0x0D), Opcode::Batch);
+        assert_eq!(Opcode::from(0x0E), Opcode::AuthChallenge);
+        assert_eq!(Opcode::from(0x0F), Opcode::AuthResponse);
+        assert_eq!(Opcode::from(0x10), Opcode::AuthSuccess);
+    }
 }
diff --git a/src/frame/parser.rs b/src/frame/parser.rs
index 9fd3e77..fad9af2 100644
--- a/src/frame/parser.rs
+++ b/src/frame/parser.rs
@@ -13,94 +13,94 @@ use crate::types::data_serialization_types::decode_timeuuid;
 use crate::types::{from_bytes, from_u16_bytes, CStringList, UUID_LEN};
 
 pub fn from_connection<M, T>(
-  conn: &r2d2::PooledConnection<M>,
-  compressor: &Compression,
+    conn: &r2d2::PooledConnection<M>,
+    compressor: &Compression,
 ) -> error::Result<Frame>
 where
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 {
-  parse_frame(conn.deref(), compressor)
+    parse_frame(conn.deref(), compressor)
 }
 
 pub fn parse_frame(cursor_cell: &RefCell<Read>, compressor: &Compression) -> error::Result<Frame> {
-  let mut version_bytes = [0; Version::BYTE_LENGTH];
-  let mut flag_bytes = [0; Flag::BYTE_LENGTH];
-  let mut opcode_bytes = [0; Opcode::BYTE_LENGTH];
-  let mut stream_bytes = [0; STREAM_LEN];
-  let mut length_bytes = [0; LENGTH_LEN];
-  let mut cursor = cursor_cell.borrow_mut();
-
-  // NOTE: order of reads matters
-  cursor.read_exact(&mut version_bytes)?;
-  cursor.read_exact(&mut flag_bytes)?;
-  cursor.read_exact(&mut stream_bytes)?;
-  cursor.read_exact(&mut opcode_bytes)?;
-  cursor.read_exact(&mut length_bytes)?;
-
-  let version = Version::from(version_bytes.to_vec());
-  let flags = Flag::get_collection(flag_bytes[0]);
-  let stream = from_u16_bytes(&stream_bytes);
-  let opcode = Opcode::from(opcode_bytes[0]);
-  let length = from_bytes(&length_bytes) as usize;
-
-  let mut body_bytes = Vec::with_capacity(length);
-  unsafe {
-    body_bytes.set_len(length);
-  }
-
-  cursor.read_exact(&mut body_bytes)?;
-
-  let full_body = if flags.iter().any(|flag| flag == &Flag::Compression) {
-    compressor.decode(body_bytes)?
-  } else {
-    Compression::None.decode(body_bytes)?
-  };
-
-  // Use cursor to get tracing id, warnings and actual body
-  let mut body_cursor = Cursor::new(full_body.as_slice());
-
-  let tracing_id = if flags.iter().any(|flag| flag == &Flag::Tracing) {
-    let mut tracing_bytes = Vec::with_capacity(UUID_LEN);
+    let mut version_bytes = [0; Version::BYTE_LENGTH];
+    let mut flag_bytes = [0; Flag::BYTE_LENGTH];
+    let mut opcode_bytes = [0; Opcode::BYTE_LENGTH];
+    let mut stream_bytes = [0; STREAM_LEN];
+    let mut length_bytes = [0; LENGTH_LEN];
+    let mut cursor = cursor_cell.borrow_mut();
+
+    // NOTE: order of reads matters
+    cursor.read_exact(&mut version_bytes)?;
+    cursor.read_exact(&mut flag_bytes)?;
+    cursor.read_exact(&mut stream_bytes)?;
+    cursor.read_exact(&mut opcode_bytes)?;
+    cursor.read_exact(&mut length_bytes)?;
+
+    let version = Version::from(version_bytes.to_vec());
+    let flags = Flag::get_collection(flag_bytes[0]);
+    let stream = from_u16_bytes(&stream_bytes);
+    let opcode = Opcode::from(opcode_bytes[0]);
+    let length = from_bytes(&length_bytes) as usize;
+
+    let mut body_bytes = Vec::with_capacity(length);
     unsafe {
-      tracing_bytes.set_len(UUID_LEN);
+        body_bytes.set_len(length);
     }
-    body_cursor.read_exact(&mut tracing_bytes)?;
-
-    decode_timeuuid(tracing_bytes.as_slice()).ok()
-  } else {
-    None
-  };
-
-  let warnings = if flags.iter().any(|flag| flag == &Flag::Warning) {
-    CStringList::from_cursor(&mut body_cursor)?.into_plain()
-  } else {
-    vec![]
-  };
-
-  let mut body = vec![];
-
-  body_cursor.read_to_end(&mut body)?;
-
-  let frame = Frame {
-    version: version,
-    flags: flags,
-    opcode: opcode,
-    stream: stream,
-    body: body,
-    tracing_id: tracing_id,
-    warnings: warnings,
-  };
-
-  convert_frame_into_result(frame)
+
+    cursor.read_exact(&mut body_bytes)?;
+
+    let full_body = if flags.iter().any(|flag| flag == &Flag::Compression) {
+        compressor.decode(body_bytes)?
+    } else {
+        Compression::None.decode(body_bytes)?
+    };
+
+    // Use cursor to get tracing id, warnings and actual body
+    let mut body_cursor = Cursor::new(full_body.as_slice());
+
+    let tracing_id = if flags.iter().any(|flag| flag == &Flag::Tracing) {
+        let mut tracing_bytes = Vec::with_capacity(UUID_LEN);
+        unsafe {
+            tracing_bytes.set_len(UUID_LEN);
+        }
+        body_cursor.read_exact(&mut tracing_bytes)?;
+
+        decode_timeuuid(tracing_bytes.as_slice()).ok()
+    } else {
+        None
+    };
+
+    let warnings = if flags.iter().any(|flag| flag == &Flag::Warning) {
+        CStringList::from_cursor(&mut body_cursor)?.into_plain()
+    } else {
+        vec![]
+    };
+
+    let mut body = vec![];
+
+    body_cursor.read_to_end(&mut body)?;
+
+    let frame = Frame {
+        version: version,
+        flags: flags,
+        opcode: opcode,
+        stream: stream,
+        body: body,
+        tracing_id: tracing_id,
+        warnings: warnings,
+    };
+
+    convert_frame_into_result(frame)
 }
 
 fn convert_frame_into_result(frame: Frame) -> error::Result<Frame> {
-  match frame.opcode {
-    Opcode::Error => frame.get_body().and_then(|err| match err {
-      ResponseBody::Error(err) => Err(error::Error::Server(err)),
-      _ => unreachable!(),
-    }),
-    _ => Ok(frame),
-  }
+    match frame.opcode {
+        Opcode::Error => frame.get_body().and_then(|err| match err {
+            ResponseBody::Error(err) => Err(error::Error::Server(err)),
+            _ => unreachable!(),
+        }),
+        _ => Ok(frame),
+    }
 }
diff --git a/src/frame/traits.rs b/src/frame/traits.rs
index 066e736..4d719bd 100644
--- a/src/frame/traits.rs
+++ b/src/frame/traits.rs
@@ -7,49 +7,49 @@ use crate::types::udt::UDT;
 
 /// `IntoBytes` should be used to convert a structure into array of bytes.
 pub trait IntoBytes {
-  /// It should convert a struct into an array of bytes.
-  fn into_cbytes(&self) -> Vec<u8>;
+    /// It should convert a struct into an array of bytes.
+    fn into_cbytes(&self) -> Vec<u8>;
 }
 
 /// `FromBytes` should be used to parse an array of bytes into a structure.
 pub trait FromBytes {
-  /// It gets and array of bytes and should return an implementor struct.
-  fn from_bytes(bytes: &[u8]) -> error::Result<Self>
-  where
-    Self: Sized;
+    /// It gets and array of bytes and should return an implementor struct.
+    fn from_bytes(bytes: &[u8]) -> error::Result<Self>
+    where
+        Self: Sized;
 }
 
 /// `AsBytes` should be used to convert a value into a single byte.
 pub trait AsByte {
-  /// It should represent a struct as a single byte.
-  fn as_byte(&self) -> u8;
+    /// It should represent a struct as a single byte.
+    fn as_byte(&self) -> u8;
 }
 
 /// `FromSingleByte` should be used to convert a single byte into a value.
 /// It is opposite to `AsByte`.
 pub trait FromSingleByte {
-  /// It should convert a single byte into an implementor struct.
-  fn from_byte(byte: u8) -> Self;
+    /// It should convert a single byte into an implementor struct.
+    fn from_byte(byte: u8) -> Self;
 }
 
 /// `FromCursor` should be used to get parsed structure from an `io:Cursor`
 /// wich bound to an array of bytes.
 pub trait FromCursor {
-  /// It should return an implementor from an `io::Cursor` over an array of bytes.
-  fn from_cursor(cursor: &mut Cursor<&[u8]>) -> error::Result<Self>
-  where
-    Self: Sized;
+    /// It should return an implementor from an `io::Cursor` over an array of bytes.
+    fn from_cursor(cursor: &mut Cursor<&[u8]>) -> error::Result<Self>
+    where
+        Self: Sized;
 }
 
 /// The trait that allows transformation of `Self` to CDRS query values.
 pub trait IntoQueryValues {
-  fn into_query_values(self) -> query::QueryValues;
+    fn into_query_values(self) -> query::QueryValues;
 }
 
 pub trait TryFromRow: Sized {
-  fn try_from_row(row: Row) -> error::Result<Self>;
+    fn try_from_row(row: Row) -> error::Result<Self>;
 }
 
 pub trait TryFromUDT: Sized {
-  fn try_from_udt(udt: UDT) -> error::Result<Self>;
+    fn try_from_udt(udt: UDT) -> error::Result<Self>;
 }
diff --git a/src/load_balancing/mod.rs b/src/load_balancing/mod.rs
index 6906d6b..039fa11 100644
--- a/src/load_balancing/mod.rs
+++ b/src/load_balancing/mod.rs
@@ -9,6 +9,6 @@ pub use crate::load_balancing::round_robin_sync::RoundRobinSync;
 pub use crate::load_balancing::single_node::SingleNode;
 
 pub trait LoadBalancingStrategy<N>: Sized {
-  fn init(&mut self, cluster: Vec<N>);
-  fn next(&self) -> Option<&N>;
+    fn init(&mut self, cluster: Vec<N>);
+    fn next(&self) -> Option<&N>;
 }
diff --git a/src/load_balancing/random.rs b/src/load_balancing/random.rs
index 68b40a1..962abc5 100644
--- a/src/load_balancing/random.rs
+++ b/src/load_balancing/random.rs
@@ -3,51 +3,51 @@ use rand;
 use super::LoadBalancingStrategy;
 
 pub struct Random<N> {
-  pub cluster: Vec<N>,
+    pub cluster: Vec<N>,
 }
 
 impl<N> Random<N> {
-  pub fn new(cluster: Vec<N>) -> Self {
-    Random { cluster }
-  }
-
-  /// Returns random number from a range
-  fn rnd_idx(bounds: (usize, usize)) -> usize {
-    let min = bounds.0;
-    let max = bounds.1;
-    let rnd = rand::random::<usize>();
-    rnd % (max - min) + min
-  }
+    pub fn new(cluster: Vec<N>) -> Self {
+        Random { cluster }
+    }
+
+    /// Returns random number from a range
+    fn rnd_idx(bounds: (usize, usize)) -> usize {
+        let min = bounds.0;
+        let max = bounds.1;
+        let rnd = rand::random::<usize>();
+        rnd % (max - min) + min
+    }
 }
 
 impl<N> From<Vec<N>> for Random<N> {
-  fn from(cluster: Vec<N>) -> Random<N> {
-    Random { cluster }
-  }
+    fn from(cluster: Vec<N>) -> Random<N> {
+        Random { cluster }
+    }
 }
 
 impl<N> LoadBalancingStrategy<N> for Random<N> {
-  fn init(&mut self, cluster: Vec<N>) {
-    self.cluster = cluster;
-  }
-  /// Returns next random node from a cluster
-  fn next(&self) -> Option<&N> {
-    let len = self.cluster.len();
-    self.cluster.get(Self::rnd_idx((0, len)))
-  }
+    fn init(&mut self, cluster: Vec<N>) {
+        self.cluster = cluster;
+    }
+    /// Returns next random node from a cluster
+    fn next(&self) -> Option<&N> {
+        let len = self.cluster.len();
+        self.cluster.get(Self::rnd_idx((0, len)))
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn random() {
-    let nodes = vec!["a", "b", "c", "d", "e", "f", "g"];
-    let load_balancer = Random::from(nodes);
-    for _ in 0..100 {
-      let s = load_balancer.next();
-      assert!(s.is_some());
+    use super::*;
+
+    #[test]
+    fn random() {
+        let nodes = vec!["a", "b", "c", "d", "e", "f", "g"];
+        let load_balancer = Random::from(nodes);
+        for _ in 0..100 {
+            let s = load_balancer.next();
+            assert!(s.is_some());
+        }
     }
-  }
 }
diff --git a/src/load_balancing/round_robin.rs b/src/load_balancing/round_robin.rs
index eec34c7..abda915 100644
--- a/src/load_balancing/round_robin.rs
+++ b/src/load_balancing/round_robin.rs
@@ -3,53 +3,53 @@ use std::cell::RefCell;
 use super::LoadBalancingStrategy;
 
 pub struct RoundRobin<N> {
-  cluster: Vec<N>,
-  prev_idx: RefCell<usize>,
+    cluster: Vec<N>,
+    prev_idx: RefCell<usize>,
 }
 
 impl<N> RoundRobin<N> {
-  pub fn new() -> Self {
-    RoundRobin {
-      prev_idx: RefCell::new(0),
-      cluster: vec![],
+    pub fn new() -> Self {
+        RoundRobin {
+            prev_idx: RefCell::new(0),
+            cluster: vec![],
+        }
     }
-  }
 }
 
 impl<N> From<Vec<N>> for RoundRobin<N> {
-  fn from(cluster: Vec<N>) -> RoundRobin<N> {
-    RoundRobin {
-      prev_idx: RefCell::new(0),
-      cluster: cluster,
+    fn from(cluster: Vec<N>) -> RoundRobin<N> {
+        RoundRobin {
+            prev_idx: RefCell::new(0),
+            cluster: cluster,
+        }
     }
-  }
 }
 
 impl<N> LoadBalancingStrategy<N> for RoundRobin<N> {
-  fn init(&mut self, cluster: Vec<N>) {
-    self.cluster = cluster;
-  }
-
-  /// Returns next node from a cluster
-  fn next(&self) -> Option<&N> {
-    let prev_idx = *self.prev_idx.borrow();
-    let next_idx = (prev_idx + 1) % self.cluster.len();
-    self.prev_idx.replace(next_idx);
-    self.cluster.get(next_idx)
-  }
+    fn init(&mut self, cluster: Vec<N>) {
+        self.cluster = cluster;
+    }
+
+    /// Returns next node from a cluster
+    fn next(&self) -> Option<&N> {
+        let prev_idx = *self.prev_idx.borrow();
+        let next_idx = (prev_idx + 1) % self.cluster.len();
+        self.prev_idx.replace(next_idx);
+        self.cluster.get(next_idx)
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn round_robin() {
-    let nodes = vec!["a", "b", "c"];
-    let nodes_c = nodes.clone();
-    let load_balancer = RoundRobin::from(nodes);
-    for i in 0..10 {
-      assert_eq!(&nodes_c[(i + 1) % 3], load_balancer.next().unwrap());
+    use super::*;
+
+    #[test]
+    fn round_robin() {
+        let nodes = vec!["a", "b", "c"];
+        let nodes_c = nodes.clone();
+        let load_balancer = RoundRobin::from(nodes);
+        for i in 0..10 {
+            assert_eq!(&nodes_c[(i + 1) % 3], load_balancer.next().unwrap());
+        }
     }
-  }
 }
diff --git a/src/load_balancing/round_robin_sync.rs b/src/load_balancing/round_robin_sync.rs
index 432100d..6e8561f 100644
--- a/src/load_balancing/round_robin_sync.rs
+++ b/src/load_balancing/round_robin_sync.rs
@@ -3,57 +3,57 @@ use std::sync::Mutex;
 use super::LoadBalancingStrategy;
 
 pub struct RoundRobinSync<N> {
-  cluster: Vec<N>,
-  prev_idx: Mutex<usize>,
+    cluster: Vec<N>,
+    prev_idx: Mutex<usize>,
 }
 
 impl<N> RoundRobinSync<N> {
-  pub fn new() -> Self {
-    RoundRobinSync {
-      prev_idx: Mutex::new(0),
-      cluster: vec![],
+    pub fn new() -> Self {
+        RoundRobinSync {
+            prev_idx: Mutex::new(0),
+            cluster: vec![],
+        }
     }
-  }
 }
 
 impl<N> From<Vec<N>> for RoundRobinSync<N> {
-  fn from(cluster: Vec<N>) -> RoundRobinSync<N> {
-    RoundRobinSync {
-      prev_idx: Mutex::new(0),
-      cluster: cluster,
+    fn from(cluster: Vec<N>) -> RoundRobinSync<N> {
+        RoundRobinSync {
+            prev_idx: Mutex::new(0),
+            cluster: cluster,
+        }
     }
-  }
 }
 
 impl<N> LoadBalancingStrategy<N> for RoundRobinSync<N> {
-  fn init(&mut self, cluster: Vec<N>) {
-    self.cluster = cluster;
-  }
-
-  /// Returns next node from a cluster
-  fn next(&self) -> Option<&N> {
-    let mut prev_idx = self.prev_idx.lock();
-    if let Ok(ref mut mtx) = prev_idx {
-      let next_idx = (**mtx + 1) % self.cluster.len();
-      **mtx = next_idx;
-      self.cluster.get(next_idx)
-    } else {
-      return None;
+    fn init(&mut self, cluster: Vec<N>) {
+        self.cluster = cluster;
+    }
+
+    /// Returns next node from a cluster
+    fn next(&self) -> Option<&N> {
+        let mut prev_idx = self.prev_idx.lock();
+        if let Ok(ref mut mtx) = prev_idx {
+            let next_idx = (**mtx + 1) % self.cluster.len();
+            **mtx = next_idx;
+            self.cluster.get(next_idx)
+        } else {
+            return None;
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn round_robin() {
-    let nodes = vec!["a", "b", "c"];
-    let nodes_c = nodes.clone();
-    let load_balancer = RoundRobinSync::from(nodes);
-    for i in 0..10 {
-      assert_eq!(&nodes_c[(i + 1) % 3], load_balancer.next().unwrap());
+    use super::*;
+
+    #[test]
+    fn round_robin() {
+        let nodes = vec!["a", "b", "c"];
+        let nodes_c = nodes.clone();
+        let load_balancer = RoundRobinSync::from(nodes);
+        for i in 0..10 {
+            assert_eq!(&nodes_c[(i + 1) % 3], load_balancer.next().unwrap());
+        }
     }
-  }
 }
diff --git a/src/load_balancing/single_node.rs b/src/load_balancing/single_node.rs
index 11e6471..bed571e 100644
--- a/src/load_balancing/single_node.rs
+++ b/src/load_balancing/single_node.rs
@@ -1,45 +1,41 @@
 use super::LoadBalancingStrategy;
 
 pub struct SingleNode<N> {
-  cluster: Vec<N>
+    cluster: Vec<N>,
 }
 
 impl<N> SingleNode<N> {
-  pub fn new() -> Self {
-    SingleNode {
-      cluster: vec![]
+    pub fn new() -> Self {
+        SingleNode { cluster: vec![] }
     }
-  }
 }
 
 impl<N> From<Vec<N>> for SingleNode<N> {
-  fn from(cluster: Vec<N>) -> SingleNode<N> {
-    SingleNode {
-      cluster: cluster,
+    fn from(cluster: Vec<N>) -> SingleNode<N> {
+        SingleNode { cluster: cluster }
     }
-  }
 }
 
 impl<N> LoadBalancingStrategy<N> for SingleNode<N> {
-  fn init(&mut self, cluster: Vec<N>) {
-    self.cluster = cluster;
-  }
+    fn init(&mut self, cluster: Vec<N>) {
+        self.cluster = cluster;
+    }
 
-  /// Returns first node from cluster
-  fn next(&self) -> Option<&N> {
-    self.cluster.get(0)
-  }
+    /// Returns first node from cluster
+    fn next(&self) -> Option<&N> {
+        self.cluster.get(0)
+    }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
+    use super::*;
 
-  #[test]
-  fn single_node() {
-    let nodes = vec!["a"];
-    let nodes_c = nodes.clone();
-    let load_balancer = SingleNode::from(nodes);
-    assert_eq!(&nodes_c[0], load_balancer.next().unwrap());
-  }
+    #[test]
+    fn single_node() {
+        let nodes = vec!["a"];
+        let nodes_c = nodes.clone();
+        let load_balancer = SingleNode::from(nodes);
+        assert_eq!(&nodes_c[0], load_balancer.next().unwrap());
+    }
 }
diff --git a/src/query/batch_executor.rs b/src/query/batch_executor.rs
index 0287552..bde3a02 100644
--- a/src/query/batch_executor.rs
+++ b/src/query/batch_executor.rs
@@ -11,30 +11,30 @@ use crate::transport::CDRSTransport;
 use super::utils::{prepare_flags, send_frame};
 
 pub trait BatchExecutor<
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 >: GetConnection<T, M> + GetCompressor<'static>
 {
-  fn batch_with_params_tw(
-    &self,
-    batch: QueryBatch,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let flags = prepare_flags(with_tracing, with_warnings);
+    fn batch_with_params_tw(
+        &self,
+        batch: QueryBatch,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let flags = prepare_flags(with_tracing, with_warnings);
 
-    let query_frame = Frame::new_req_batch(batch, flags).into_cbytes();
+        let query_frame = Frame::new_req_batch(batch, flags).into_cbytes();
 
-    send_frame(self, query_frame)
-  }
+        send_frame(self, query_frame)
+    }
 
-  fn batch_with_params(&self, batch: QueryBatch) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.batch_with_params_tw(batch, false, false)
-  }
+    fn batch_with_params(&self, batch: QueryBatch) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.batch_with_params_tw(batch, false, false)
+    }
 }
diff --git a/src/query/batch_query_builder.rs b/src/query/batch_query_builder.rs
index a9cf6b6..b0db294 100644
--- a/src/query/batch_query_builder.rs
+++ b/src/query/batch_query_builder.rs
@@ -8,104 +8,104 @@ pub type QueryBatch = BodyReqBatch;
 
 #[derive(Debug)]
 pub struct BatchQueryBuilder {
-  batch_type: BatchType,
-  queries: Vec<BatchQuery>,
-  consistency: Consistency,
-  serial_consistency: Option<Consistency>,
-  timestamp: Option<i64>,
+    batch_type: BatchType,
+    queries: Vec<BatchQuery>,
+    consistency: Consistency,
+    serial_consistency: Option<Consistency>,
+    timestamp: Option<i64>,
 }
 
 impl BatchQueryBuilder {
-  pub fn new() -> BatchQueryBuilder {
-    BatchQueryBuilder {
-      batch_type: BatchType::Logged,
-      queries: vec![],
-      consistency: Consistency::One,
-      serial_consistency: None,
-      timestamp: None,
+    pub fn new() -> BatchQueryBuilder {
+        BatchQueryBuilder {
+            batch_type: BatchType::Logged,
+            queries: vec![],
+            consistency: Consistency::One,
+            serial_consistency: None,
+            timestamp: None,
+        }
     }
-  }
-
-  pub fn batch_type(mut self, batch_type: BatchType) -> Self {
-    self.batch_type = batch_type;
-    self
-  }
-
-  /// Add a query (non-prepared one)
-  pub fn add_query<T: Into<String>>(mut self, query: T, values: QueryValues) -> Self {
-    self.queries.push(BatchQuery {
-      is_prepared: false,
-      subject: BatchQuerySubj::QueryString(CStringLong::new(query.into())),
-      values,
-    });
-    self
-  }
-
-  /// Add a query (prepared one)
-  pub fn add_query_prepared(mut self, query_id: CBytesShort, values: QueryValues) -> Self {
-    self.queries.push(BatchQuery {
-      is_prepared: true,
-      subject: BatchQuerySubj::PreparedId(query_id),
-      values,
-    });
-    self
-  }
-
-  pub fn clear_queries(mut self) -> Self {
-    self.queries = vec![];
-    self
-  }
-
-  pub fn consistency(mut self, consistency: Consistency) -> Self {
-    self.consistency = consistency;
-    self
-  }
-
-  pub fn serial_consistency(mut self, serial_consistency: Option<Consistency>) -> Self {
-    self.serial_consistency = serial_consistency;
-    self
-  }
-
-  pub fn timestamp(mut self, timestamp: Option<i64>) -> Self {
-    self.timestamp = timestamp;
-    self
-  }
-
-  pub fn finalize(self) -> CResult<BodyReqBatch> {
-    let mut flags = vec![];
-
-    if self.serial_consistency.is_some() {
-      flags.push(QueryFlags::WithSerialConsistency);
+
+    pub fn batch_type(mut self, batch_type: BatchType) -> Self {
+        self.batch_type = batch_type;
+        self
+    }
+
+    /// Add a query (non-prepared one)
+    pub fn add_query<T: Into<String>>(mut self, query: T, values: QueryValues) -> Self {
+        self.queries.push(BatchQuery {
+            is_prepared: false,
+            subject: BatchQuerySubj::QueryString(CStringLong::new(query.into())),
+            values,
+        });
+        self
     }
 
-    if self.timestamp.is_some() {
-      flags.push(QueryFlags::WithDefaultTimestamp);
+    /// Add a query (prepared one)
+    pub fn add_query_prepared(mut self, query_id: CBytesShort, values: QueryValues) -> Self {
+        self.queries.push(BatchQuery {
+            is_prepared: true,
+            subject: BatchQuerySubj::PreparedId(query_id),
+            values,
+        });
+        self
     }
 
-    let with_names_for_values = self.queries.iter().all(|q| q.values.with_names());
+    pub fn clear_queries(mut self) -> Self {
+        self.queries = vec![];
+        self
+    }
 
-    if !with_names_for_values {
-      let some_names_for_values = self.queries.iter().any(|q| q.values.with_names());
+    pub fn consistency(mut self, consistency: Consistency) -> Self {
+        self.consistency = consistency;
+        self
+    }
 
-      if some_names_for_values {
-        return Err(CError::General(String::from(
-          "Inconsistent query values - mixed \
-           with and without names values",
-        )));
-      }
+    pub fn serial_consistency(mut self, serial_consistency: Option<Consistency>) -> Self {
+        self.serial_consistency = serial_consistency;
+        self
     }
 
-    if with_names_for_values {
-      flags.push(QueryFlags::WithNamesForValues);
+    pub fn timestamp(mut self, timestamp: Option<i64>) -> Self {
+        self.timestamp = timestamp;
+        self
     }
 
-    Ok(BodyReqBatch {
-      batch_type: self.batch_type,
-      queries: self.queries,
-      query_flags: flags,
-      consistency: self.consistency,
-      serial_consistency: self.serial_consistency,
-      timestamp: self.timestamp,
-    })
-  }
+    pub fn finalize(self) -> CResult<BodyReqBatch> {
+        let mut flags = vec![];
+
+        if self.serial_consistency.is_some() {
+            flags.push(QueryFlags::WithSerialConsistency);
+        }
+
+        if self.timestamp.is_some() {
+            flags.push(QueryFlags::WithDefaultTimestamp);
+        }
+
+        let with_names_for_values = self.queries.iter().all(|q| q.values.with_names());
+
+        if !with_names_for_values {
+            let some_names_for_values = self.queries.iter().any(|q| q.values.with_names());
+
+            if some_names_for_values {
+                return Err(CError::General(String::from(
+                    "Inconsistent query values - mixed \
+                     with and without names values",
+                )));
+            }
+        }
+
+        if with_names_for_values {
+            flags.push(QueryFlags::WithNamesForValues);
+        }
+
+        Ok(BodyReqBatch {
+            batch_type: self.batch_type,
+            queries: self.queries,
+            query_flags: flags,
+            consistency: self.consistency,
+            serial_consistency: self.serial_consistency,
+            timestamp: self.timestamp,
+        })
+    }
 }
diff --git a/src/query/exec_executor.rs b/src/query/exec_executor.rs
index 4601f89..f6dba93 100644
--- a/src/query/exec_executor.rs
+++ b/src/query/exec_executor.rs
@@ -13,80 +13,80 @@ use super::utils::{prepare_flags, send_frame};
 pub type PreparedQuery = CBytesShort;
 
 pub trait ExecExecutor<
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 >: GetConnection<T, M> + GetCompressor<'static>
 {
-  fn exec_with_params_tw(
-    &self,
-    prepared: &PreparedQuery,
-    query_parameters: QueryParams,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let flags = prepare_flags(with_tracing, with_warnings);
-    let options_frame = Frame::new_req_execute(prepared, query_parameters, flags).into_cbytes();
+    fn exec_with_params_tw(
+        &self,
+        prepared: &PreparedQuery,
+        query_parameters: QueryParams,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let flags = prepare_flags(with_tracing, with_warnings);
+        let options_frame = Frame::new_req_execute(prepared, query_parameters, flags).into_cbytes();
 
-    send_frame(self, options_frame)
-  }
+        send_frame(self, options_frame)
+    }
 
-  fn exec_with_params(
-    &self,
-    prepared: &PreparedQuery,
-    query_parameters: QueryParams,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.exec_with_params_tw(prepared, query_parameters, false, false)
-  }
+    fn exec_with_params(
+        &self,
+        prepared: &PreparedQuery,
+        query_parameters: QueryParams,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.exec_with_params_tw(prepared, query_parameters, false, false)
+    }
 
-  fn exec_with_values_tw<V: Into<QueryValues>>(
-    &self,
-    prepared: &PreparedQuery,
-    values: V,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let query_params_builder = QueryParamsBuilder::new();
-    let query_params = query_params_builder.values(values.into()).finalize();
-    self.exec_with_params_tw(prepared, query_params, with_tracing, with_warnings)
-  }
+    fn exec_with_values_tw<V: Into<QueryValues>>(
+        &self,
+        prepared: &PreparedQuery,
+        values: V,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let query_params_builder = QueryParamsBuilder::new();
+        let query_params = query_params_builder.values(values.into()).finalize();
+        self.exec_with_params_tw(prepared, query_params, with_tracing, with_warnings)
+    }
 
-  fn exec_with_values<V: Into<QueryValues>>(
-    &self,
-    prepared: &PreparedQuery,
-    values: V,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.exec_with_values_tw(prepared, values, false, false)
-  }
+    fn exec_with_values<V: Into<QueryValues>>(
+        &self,
+        prepared: &PreparedQuery,
+        values: V,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.exec_with_values_tw(prepared, values, false, false)
+    }
 
-  fn exec_tw(
-    &self,
-    prepared: &PreparedQuery,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let query_params = QueryParamsBuilder::new().finalize();
-    self.exec_with_params_tw(prepared, query_params, with_tracing, with_warnings)
-  }
+    fn exec_tw(
+        &self,
+        prepared: &PreparedQuery,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let query_params = QueryParamsBuilder::new().finalize();
+        self.exec_with_params_tw(prepared, query_params, with_tracing, with_warnings)
+    }
 
-  fn exec(&mut self, prepared: &PreparedQuery) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.exec_tw(prepared, false, false)
-  }
+    fn exec(&mut self, prepared: &PreparedQuery) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.exec_tw(prepared, false, false)
+    }
 }
diff --git a/src/query/prepare_executor.rs b/src/query/prepare_executor.rs
index a16c4c8..3431de2 100644
--- a/src/query/prepare_executor.rs
+++ b/src/query/prepare_executor.rs
@@ -12,43 +12,41 @@ use super::utils::{prepare_flags, send_frame};
 pub type PreparedQuery = CBytesShort;
 
 pub trait PrepareExecutor<
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 >: GetConnection<T, M> + GetCompressor<'static>
 {
-  /// It prepares a query for execution, along with query itself
-  /// the method takes `with_tracing` and `with_warnings` flags
-  /// to get tracing information and warnings.
-  fn prepare_tw<Q: ToString>(
-    &self,
-    query: Q,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<PreparedQuery>
-  where
-    Self: Sized,
-  {
-    let flags = prepare_flags(with_tracing, with_warnings);
+    /// It prepares a query for execution, along with query itself
+    /// the method takes `with_tracing` and `with_warnings` flags
+    /// to get tracing information and warnings.
+    fn prepare_tw<Q: ToString>(
+        &self,
+        query: Q,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<PreparedQuery>
+    where
+        Self: Sized,
+    {
+        let flags = prepare_flags(with_tracing, with_warnings);
 
-    let query_frame = Frame::new_req_prepare(query.to_string(), flags).into_cbytes();
+        let query_frame = Frame::new_req_prepare(query.to_string(), flags).into_cbytes();
 
-    send_frame(self, query_frame)
-      .and_then(|response| response.get_body())
-      .and_then(|body| {
-        Ok(
-          body
-            .into_prepared()
-            .expect("CDRS BUG: cannot convert frame into prepared")
-            .id,
-        )
-      })
-  }
+        send_frame(self, query_frame)
+            .and_then(|response| response.get_body())
+            .and_then(|body| {
+                Ok(body
+                    .into_prepared()
+                    .expect("CDRS BUG: cannot convert frame into prepared")
+                    .id)
+            })
+    }
 
-  /// It prepares query without additional tracing information and warnings.
-  fn prepare<Q: ToString>(&self, query: Q) -> error::Result<PreparedQuery>
-  where
-    Self: Sized,
-  {
-    self.prepare_tw(query, false, false)
-  }
+    /// It prepares query without additional tracing information and warnings.
+    fn prepare<Q: ToString>(&self, query: Q) -> error::Result<PreparedQuery>
+    where
+        Self: Sized,
+    {
+        self.prepare_tw(query, false, false)
+    }
 }
diff --git a/src/query/query.rs b/src/query/query.rs
index 6f15de0..e21f967 100644
--- a/src/query/query.rs
+++ b/src/query/query.rs
@@ -4,6 +4,6 @@ use super::QueryParams;
 /// its execution
 #[derive(Debug, Default)]
 pub struct Query {
-  pub query: String,
-  pub params: QueryParams,
+    pub query: String,
+    pub params: QueryParams,
 }
diff --git a/src/query/query_executor.rs b/src/query/query_executor.rs
index 8c72426..f2f6990 100644
--- a/src/query/query_executor.rs
+++ b/src/query/query_executor.rs
@@ -10,94 +10,94 @@ use crate::transport::CDRSTransport;
 use super::utils::{prepare_flags, send_frame};
 
 pub trait QueryExecutor<
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 >: GetConnection<T, M> + GetCompressor<'static>
 {
-  fn query_with_params_tw<Q: ToString>(
-    &self,
-    query: Q,
-    query_params: QueryParams,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let query = Query {
-      query: query.to_string(),
-      params: query_params,
-    };
+    fn query_with_params_tw<Q: ToString>(
+        &self,
+        query: Q,
+        query_params: QueryParams,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let query = Query {
+            query: query.to_string(),
+            params: query_params,
+        };
 
-    let flags = prepare_flags(with_tracing, with_warnings);
+        let flags = prepare_flags(with_tracing, with_warnings);
 
-    let query_frame = Frame::new_query(query, flags).into_cbytes();
+        let query_frame = Frame::new_query(query, flags).into_cbytes();
 
-    send_frame(self, query_frame)
-  }
+        send_frame(self, query_frame)
+    }
 
-  /// Executes a query with default parameters:
-  /// * TDB
-  fn query<Q: ToString>(&self, query: Q) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.query_tw(query, false, false)
-  }
+    /// Executes a query with default parameters:
+    /// * TDB
+    fn query<Q: ToString>(&self, query: Q) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.query_tw(query, false, false)
+    }
 
-  /// Executes a query with ability to trace it and see warnings, and default parameters:
-  /// * TBD
-  fn query_tw<Q: ToString>(
-    &self,
-    query: Q,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let query_params = QueryParamsBuilder::new().finalize();
-    self.query_with_params_tw(query, query_params, with_tracing, with_warnings)
-  }
+    /// Executes a query with ability to trace it and see warnings, and default parameters:
+    /// * TBD
+    fn query_tw<Q: ToString>(
+        &self,
+        query: Q,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let query_params = QueryParamsBuilder::new().finalize();
+        self.query_with_params_tw(query, query_params, with_tracing, with_warnings)
+    }
 
-  /// Executes a query with bounded values (either with or without names).
-  fn query_with_values<Q: ToString, V: Into<QueryValues>>(
-    &self,
-    query: Q,
-    values: V,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.query_with_values_tw(query, values, false, false)
-  }
+    /// Executes a query with bounded values (either with or without names).
+    fn query_with_values<Q: ToString, V: Into<QueryValues>>(
+        &self,
+        query: Q,
+        values: V,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.query_with_values_tw(query, values, false, false)
+    }
 
-  /// Executes a query with bounded values (either with or without names)
-  /// and ability to see warnings, trace a request and default parameters.
-  fn query_with_values_tw<Q: ToString, V: Into<QueryValues>>(
-    &self,
-    query: Q,
-    values: V,
-    with_tracing: bool,
-    with_warnings: bool,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    let query_params_builder = QueryParamsBuilder::new();
-    let query_params = query_params_builder.values(values.into()).finalize();
-    self.query_with_params_tw(query, query_params, with_tracing, with_warnings)
-  }
+    /// Executes a query with bounded values (either with or without names)
+    /// and ability to see warnings, trace a request and default parameters.
+    fn query_with_values_tw<Q: ToString, V: Into<QueryValues>>(
+        &self,
+        query: Q,
+        values: V,
+        with_tracing: bool,
+        with_warnings: bool,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        let query_params_builder = QueryParamsBuilder::new();
+        let query_params = query_params_builder.values(values.into()).finalize();
+        self.query_with_params_tw(query, query_params, with_tracing, with_warnings)
+    }
 
-  /// Executes a query with query params without warnings and tracing.
-  fn query_with_params<Q: ToString>(
-    &self,
-    query: Q,
-    query_params: QueryParams,
-  ) -> error::Result<Frame>
-  where
-    Self: Sized,
-  {
-    self.query_with_params_tw(query, query_params, false, false)
-  }
+    /// Executes a query with query params without warnings and tracing.
+    fn query_with_params<Q: ToString>(
+        &self,
+        query: Q,
+        query_params: QueryParams,
+    ) -> error::Result<Frame>
+    where
+        Self: Sized,
+    {
+        self.query_with_params_tw(query, query_params, false, false)
+    }
 }
diff --git a/src/query/query_flags.rs b/src/query/query_flags.rs
index 8e73541..fd85f95 100644
--- a/src/query/query_flags.rs
+++ b/src/query/query_flags.rs
@@ -11,301 +11,301 @@ const WITH_NAME_FOR_VALUES: u8 = 0x40;
 /// Cassandra Query Flags.
 #[derive(Clone, Debug)]
 pub enum QueryFlags {
-  /// If set indicates that Query Params contains value.
-  Value,
-  /// If set indicates that Query Params does not contain metadata.
-  SkipMetadata,
-  /// If set indicates that Query Params contains page size.
-  PageSize,
-  /// If set indicates that Query Params contains paging state.
-  WithPagingState,
-  /// If set indicates that Query Params contains serial consistency.
-  WithSerialConsistency,
-  /// If set indicates that Query Params contains default timestamp.
-  WithDefaultTimestamp,
-  /// If set indicates that Query Params values are named ones.
-  WithNamesForValues,
+    /// If set indicates that Query Params contains value.
+    Value,
+    /// If set indicates that Query Params does not contain metadata.
+    SkipMetadata,
+    /// If set indicates that Query Params contains page size.
+    PageSize,
+    /// If set indicates that Query Params contains paging state.
+    WithPagingState,
+    /// If set indicates that Query Params contains serial consistency.
+    WithSerialConsistency,
+    /// If set indicates that Query Params contains default timestamp.
+    WithDefaultTimestamp,
+    /// If set indicates that Query Params values are named ones.
+    WithNamesForValues,
 }
 
 impl QueryFlags {
-  #[doc(hidden)]
-  pub fn has_value(byte: u8) -> bool {
-    (byte & FLAGS_VALUE) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_value(byte: u8) -> u8 {
-    byte | FLAGS_VALUE
-  }
-
-  #[doc(hidden)]
-  pub fn has_skip_metadata(byte: u8) -> bool {
-    (byte & FLAGS_SKIP_METADATA) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_skip_metadata(byte: u8) -> u8 {
-    byte | FLAGS_SKIP_METADATA
-  }
-
-  #[doc(hidden)]
-  pub fn has_page_size(byte: u8) -> bool {
-    (byte & WITH_PAGE_SIZE) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_page_size(byte: u8) -> u8 {
-    byte | WITH_PAGE_SIZE
-  }
-
-  #[doc(hidden)]
-  pub fn has_with_paging_state(byte: u8) -> bool {
-    (byte & WITH_PAGING_STATE) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_with_paging_state(byte: u8) -> u8 {
-    byte | WITH_PAGING_STATE
-  }
-
-  #[doc(hidden)]
-  pub fn has_with_serial_consistency(byte: u8) -> bool {
-    (byte & WITH_SERIAL_CONSISTENCY) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_with_serial_consistency(byte: u8) -> u8 {
-    byte | WITH_SERIAL_CONSISTENCY
-  }
-
-  #[doc(hidden)]
-  pub fn has_with_default_timestamp(byte: u8) -> bool {
-    (byte & WITH_DEFAULT_TIMESTAMP) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_with_default_timestamp(byte: u8) -> u8 {
-    byte | WITH_DEFAULT_TIMESTAMP
-  }
-
-  #[doc(hidden)]
-  pub fn has_with_names_for_values(byte: u8) -> bool {
-    (byte & WITH_NAME_FOR_VALUES) != 0
-  }
-
-  #[doc(hidden)]
-  pub fn set_with_names_for_values(byte: u8) -> u8 {
-    byte | WITH_NAME_FOR_VALUES
-  }
+    #[doc(hidden)]
+    pub fn has_value(byte: u8) -> bool {
+        (byte & FLAGS_VALUE) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_value(byte: u8) -> u8 {
+        byte | FLAGS_VALUE
+    }
+
+    #[doc(hidden)]
+    pub fn has_skip_metadata(byte: u8) -> bool {
+        (byte & FLAGS_SKIP_METADATA) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_skip_metadata(byte: u8) -> u8 {
+        byte | FLAGS_SKIP_METADATA
+    }
+
+    #[doc(hidden)]
+    pub fn has_page_size(byte: u8) -> bool {
+        (byte & WITH_PAGE_SIZE) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_page_size(byte: u8) -> u8 {
+        byte | WITH_PAGE_SIZE
+    }
+
+    #[doc(hidden)]
+    pub fn has_with_paging_state(byte: u8) -> bool {
+        (byte & WITH_PAGING_STATE) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_with_paging_state(byte: u8) -> u8 {
+        byte | WITH_PAGING_STATE
+    }
+
+    #[doc(hidden)]
+    pub fn has_with_serial_consistency(byte: u8) -> bool {
+        (byte & WITH_SERIAL_CONSISTENCY) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_with_serial_consistency(byte: u8) -> u8 {
+        byte | WITH_SERIAL_CONSISTENCY
+    }
+
+    #[doc(hidden)]
+    pub fn has_with_default_timestamp(byte: u8) -> bool {
+        (byte & WITH_DEFAULT_TIMESTAMP) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_with_default_timestamp(byte: u8) -> u8 {
+        byte | WITH_DEFAULT_TIMESTAMP
+    }
+
+    #[doc(hidden)]
+    pub fn has_with_names_for_values(byte: u8) -> bool {
+        (byte & WITH_NAME_FOR_VALUES) != 0
+    }
+
+    #[doc(hidden)]
+    pub fn set_with_names_for_values(byte: u8) -> u8 {
+        byte | WITH_NAME_FOR_VALUES
+    }
 }
 
 impl AsByte for QueryFlags {
-  fn as_byte(&self) -> u8 {
-    match *self {
-      QueryFlags::Value => FLAGS_VALUE,
-      QueryFlags::SkipMetadata => FLAGS_SKIP_METADATA,
-      QueryFlags::PageSize => WITH_PAGE_SIZE,
-      QueryFlags::WithPagingState => WITH_PAGING_STATE,
-      QueryFlags::WithSerialConsistency => WITH_SERIAL_CONSISTENCY,
-      QueryFlags::WithDefaultTimestamp => WITH_DEFAULT_TIMESTAMP,
-      QueryFlags::WithNamesForValues => WITH_NAME_FOR_VALUES,
+    fn as_byte(&self) -> u8 {
+        match *self {
+            QueryFlags::Value => FLAGS_VALUE,
+            QueryFlags::SkipMetadata => FLAGS_SKIP_METADATA,
+            QueryFlags::PageSize => WITH_PAGE_SIZE,
+            QueryFlags::WithPagingState => WITH_PAGING_STATE,
+            QueryFlags::WithSerialConsistency => WITH_SERIAL_CONSISTENCY,
+            QueryFlags::WithDefaultTimestamp => WITH_DEFAULT_TIMESTAMP,
+            QueryFlags::WithNamesForValues => WITH_NAME_FOR_VALUES,
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-
-  #[test]
-  fn has_value_test() {
-    assert!(
-      QueryFlags::has_value(FLAGS_VALUE | 0x10),
-      "should show that the flag has value"
-    );
-    assert!(
-      !QueryFlags::has_value(FLAGS_SKIP_METADATA),
-      "should show that the flag does NOT have value"
-    );
-  }
-
-  #[test]
-  fn set_value_test() {
-    assert_eq!(
-      QueryFlags::set_value(0),
-      FLAGS_VALUE,
-      "should set has value flag"
-    );
-  }
-
-  #[test]
-  fn has_skip_metadata_test() {
-    assert!(
-      QueryFlags::has_skip_metadata(FLAGS_SKIP_METADATA | 0x10),
-      "should show that the flag has skip metadata"
-    );
-    assert!(
-      !QueryFlags::has_skip_metadata(FLAGS_VALUE),
-      "should show that the flag does NOT have skip metadata"
-    );
-  }
-
-  #[test]
-  fn set_skip_metadata_test() {
-    assert_eq!(
-      QueryFlags::set_skip_metadata(0),
-      FLAGS_SKIP_METADATA,
-      "should set has skip metadata flag"
-    );
-  }
-
-  #[test]
-  fn has_page_size_test() {
-    assert!(
-      QueryFlags::has_page_size(WITH_PAGE_SIZE | 0x10),
-      "should show that the flag has with page size"
-    );
-    assert!(
-      !QueryFlags::has_page_size(FLAGS_VALUE),
-      "should show that the flag does NOT have with page size"
-    );
-  }
-
-  #[test]
-  fn set_page_size_test() {
-    assert_eq!(
-      QueryFlags::set_page_size(0),
-      WITH_PAGE_SIZE,
-      "should set has page size flag"
-    );
-  }
-
-  #[test]
-  fn has_with_paging_state_test() {
-    assert!(
-      QueryFlags::has_with_paging_state(WITH_PAGING_STATE | 0x10),
-      "should show that the flag has with paging state"
-    );
-    assert!(
-      !QueryFlags::has_with_paging_state(FLAGS_VALUE),
-      "should show that the flag does NOT have with paging state"
-    );
-  }
-
-  #[test]
-  fn set_with_paging_state_test() {
-    assert_eq!(
-      QueryFlags::set_with_paging_state(0),
-      WITH_PAGING_STATE,
-      "should set has with paging state flag"
-    );
-  }
-
-  #[test]
-  fn has_with_serial_consistency_test() {
-    assert!(
-      QueryFlags::has_with_serial_consistency(WITH_SERIAL_CONSISTENCY | 0x11),
-      "should show that the flag has with serial consistency"
-    );
-    assert!(
-      !QueryFlags::has_with_serial_consistency(FLAGS_VALUE),
-      "should show that the flag does NOT have with serial consistency"
-    );
-  }
-
-  #[test]
-  fn set_with_serial_consistency_test() {
-    assert_eq!(
-      QueryFlags::set_with_serial_consistency(0),
-      WITH_SERIAL_CONSISTENCY,
-      "should set has with serial consistency flag"
-    );
-  }
-
-  #[test]
-  fn has_with_default_timestamp_test() {
-    assert!(
-      QueryFlags::has_with_default_timestamp(WITH_DEFAULT_TIMESTAMP | 0x10),
-      "should show that the flag has with default timestamp"
-    );
-    assert!(
-      !QueryFlags::has_with_default_timestamp(FLAGS_VALUE),
-      "should show that the flag does NOT have with default timestamp"
-    );
-  }
-
-  #[test]
-  fn set_with_default_timestamp_test() {
-    assert_eq!(
-      QueryFlags::set_with_default_timestamp(0),
-      WITH_DEFAULT_TIMESTAMP,
-      "should set has with serial consistency flag"
-    );
-  }
-
-  #[test]
-  fn has_with_names_for_values_test() {
-    assert!(
-      QueryFlags::has_with_names_for_values(WITH_NAME_FOR_VALUES | 0x10),
-      "should show that the flag has with name for values"
-    );
-    assert!(
-      !QueryFlags::has_with_names_for_values(FLAGS_VALUE),
-      "should show that the flag does NOT have with name for values"
-    );
-  }
-
-  #[test]
-  fn set_with_names_for_values_test() {
-    assert_eq!(
-      QueryFlags::set_with_names_for_values(0),
-      WITH_NAME_FOR_VALUES,
-      "should set has with name for values flag"
-    );
-  }
-
-  #[test]
-  fn as_byte_test() {
-    assert_eq!(
-      QueryFlags::Value.as_byte(),
-      FLAGS_VALUE,
-      "should propery convert values flag"
-    );
-
-    assert_eq!(
-      QueryFlags::SkipMetadata.as_byte(),
-      FLAGS_SKIP_METADATA,
-      "should propery convert skip metadata flag"
-    );
-
-    assert_eq!(
-      QueryFlags::PageSize.as_byte(),
-      WITH_PAGE_SIZE,
-      "should propery convert with page size flag"
-    );
-
-    assert_eq!(
-      QueryFlags::WithPagingState.as_byte(),
-      WITH_PAGING_STATE,
-      "should propery convert with paging state flag"
-    );
-
-    assert_eq!(
-      QueryFlags::WithSerialConsistency.as_byte(),
-      WITH_SERIAL_CONSISTENCY,
-      "should propery convert with serial consistency flag"
-    );
-
-    assert_eq!(
-      QueryFlags::WithDefaultTimestamp.as_byte(),
-      WITH_DEFAULT_TIMESTAMP,
-      "should propery convert with default timestamp flag"
-    );
-
-    assert_eq!(
-      QueryFlags::WithNamesForValues.as_byte(),
-      WITH_NAME_FOR_VALUES,
-      "should propery convert with name for values flag"
-    );
-  }
+    use super::*;
+
+    #[test]
+    fn has_value_test() {
+        assert!(
+            QueryFlags::has_value(FLAGS_VALUE | 0x10),
+            "should show that the flag has value"
+        );
+        assert!(
+            !QueryFlags::has_value(FLAGS_SKIP_METADATA),
+            "should show that the flag does NOT have value"
+        );
+    }
+
+    #[test]
+    fn set_value_test() {
+        assert_eq!(
+            QueryFlags::set_value(0),
+            FLAGS_VALUE,
+            "should set has value flag"
+        );
+    }
+
+    #[test]
+    fn has_skip_metadata_test() {
+        assert!(
+            QueryFlags::has_skip_metadata(FLAGS_SKIP_METADATA | 0x10),
+            "should show that the flag has skip metadata"
+        );
+        assert!(
+            !QueryFlags::has_skip_metadata(FLAGS_VALUE),
+            "should show that the flag does NOT have skip metadata"
+        );
+    }
+
+    #[test]
+    fn set_skip_metadata_test() {
+        assert_eq!(
+            QueryFlags::set_skip_metadata(0),
+            FLAGS_SKIP_METADATA,
+            "should set has skip metadata flag"
+        );
+    }
+
+    #[test]
+    fn has_page_size_test() {
+        assert!(
+            QueryFlags::has_page_size(WITH_PAGE_SIZE | 0x10),
+            "should show that the flag has with page size"
+        );
+        assert!(
+            !QueryFlags::has_page_size(FLAGS_VALUE),
+            "should show that the flag does NOT have with page size"
+        );
+    }
+
+    #[test]
+    fn set_page_size_test() {
+        assert_eq!(
+            QueryFlags::set_page_size(0),
+            WITH_PAGE_SIZE,
+            "should set has page size flag"
+        );
+    }
+
+    #[test]
+    fn has_with_paging_state_test() {
+        assert!(
+            QueryFlags::has_with_paging_state(WITH_PAGING_STATE | 0x10),
+            "should show that the flag has with paging state"
+        );
+        assert!(
+            !QueryFlags::has_with_paging_state(FLAGS_VALUE),
+            "should show that the flag does NOT have with paging state"
+        );
+    }
+
+    #[test]
+    fn set_with_paging_state_test() {
+        assert_eq!(
+            QueryFlags::set_with_paging_state(0),
+            WITH_PAGING_STATE,
+            "should set has with paging state flag"
+        );
+    }
+
+    #[test]
+    fn has_with_serial_consistency_test() {
+        assert!(
+            QueryFlags::has_with_serial_consistency(WITH_SERIAL_CONSISTENCY | 0x11),
+            "should show that the flag has with serial consistency"
+        );
+        assert!(
+            !QueryFlags::has_with_serial_consistency(FLAGS_VALUE),
+            "should show that the flag does NOT have with serial consistency"
+        );
+    }
+
+    #[test]
+    fn set_with_serial_consistency_test() {
+        assert_eq!(
+            QueryFlags::set_with_serial_consistency(0),
+            WITH_SERIAL_CONSISTENCY,
+            "should set has with serial consistency flag"
+        );
+    }
+
+    #[test]
+    fn has_with_default_timestamp_test() {
+        assert!(
+            QueryFlags::has_with_default_timestamp(WITH_DEFAULT_TIMESTAMP | 0x10),
+            "should show that the flag has with default timestamp"
+        );
+        assert!(
+            !QueryFlags::has_with_default_timestamp(FLAGS_VALUE),
+            "should show that the flag does NOT have with default timestamp"
+        );
+    }
+
+    #[test]
+    fn set_with_default_timestamp_test() {
+        assert_eq!(
+            QueryFlags::set_with_default_timestamp(0),
+            WITH_DEFAULT_TIMESTAMP,
+            "should set has with serial consistency flag"
+        );
+    }
+
+    #[test]
+    fn has_with_names_for_values_test() {
+        assert!(
+            QueryFlags::has_with_names_for_values(WITH_NAME_FOR_VALUES | 0x10),
+            "should show that the flag has with name for values"
+        );
+        assert!(
+            !QueryFlags::has_with_names_for_values(FLAGS_VALUE),
+            "should show that the flag does NOT have with name for values"
+        );
+    }
+
+    #[test]
+    fn set_with_names_for_values_test() {
+        assert_eq!(
+            QueryFlags::set_with_names_for_values(0),
+            WITH_NAME_FOR_VALUES,
+            "should set has with name for values flag"
+        );
+    }
+
+    #[test]
+    fn as_byte_test() {
+        assert_eq!(
+            QueryFlags::Value.as_byte(),
+            FLAGS_VALUE,
+            "should propery convert values flag"
+        );
+
+        assert_eq!(
+            QueryFlags::SkipMetadata.as_byte(),
+            FLAGS_SKIP_METADATA,
+            "should propery convert skip metadata flag"
+        );
+
+        assert_eq!(
+            QueryFlags::PageSize.as_byte(),
+            WITH_PAGE_SIZE,
+            "should propery convert with page size flag"
+        );
+
+        assert_eq!(
+            QueryFlags::WithPagingState.as_byte(),
+            WITH_PAGING_STATE,
+            "should propery convert with paging state flag"
+        );
+
+        assert_eq!(
+            QueryFlags::WithSerialConsistency.as_byte(),
+            WITH_SERIAL_CONSISTENCY,
+            "should propery convert with serial consistency flag"
+        );
+
+        assert_eq!(
+            QueryFlags::WithDefaultTimestamp.as_byte(),
+            WITH_DEFAULT_TIMESTAMP,
+            "should propery convert with default timestamp flag"
+        );
+
+        assert_eq!(
+            QueryFlags::WithNamesForValues.as_byte(),
+            WITH_NAME_FOR_VALUES,
+            "should propery convert with name for values flag"
+        );
+    }
 }
diff --git a/src/query/query_params.rs b/src/query/query_params.rs
index b495831..eabd9c5 100644
--- a/src/query/query_params.rs
+++ b/src/query/query_params.rs
@@ -8,124 +8,122 @@ use crate::types::{to_bigint, to_int, to_short, CBytes};
 /// Parameters of Query for query operation.
 #[derive(Debug, Default)]
 pub struct QueryParams {
-  /// Cassandra consistency level.
-  pub consistency: Consistency,
-  /// Array of query flags.
-  pub flags: Vec<QueryFlags>,
-  /// Were values provided with names
-  pub with_names: Option<bool>,
-  /// Array of values.
-  pub values: Option<QueryValues>,
-  /// Page size.
-  pub page_size: Option<i32>,
-  /// Array of bytes which represents paging state.
-  pub paging_state: Option<CBytes>,
-  /// Serial `Consistency`.
-  pub serial_consistency: Option<Consistency>,
-  /// Timestamp.
-  pub timestamp: Option<i64>,
+    /// Cassandra consistency level.
+    pub consistency: Consistency,
+    /// Array of query flags.
+    pub flags: Vec<QueryFlags>,
+    /// Were values provided with names
+    pub with_names: Option<bool>,
+    /// Array of values.
+    pub values: Option<QueryValues>,
+    /// Page size.
+    pub page_size: Option<i32>,
+    /// Array of bytes which represents paging state.
+    pub paging_state: Option<CBytes>,
+    /// Serial `Consistency`.
+    pub serial_consistency: Option<Consistency>,
+    /// Timestamp.
+    pub timestamp: Option<i64>,
 }
 
 impl QueryParams {
-  /// Sets values of Query request params.
-  pub fn set_values(&mut self, values: QueryValues) {
-    self.flags.push(QueryFlags::Value);
-    self.values = Some(values);
-  }
+    /// Sets values of Query request params.
+    pub fn set_values(&mut self, values: QueryValues) {
+        self.flags.push(QueryFlags::Value);
+        self.values = Some(values);
+    }
 
-  fn flags_as_byte(&self) -> u8 {
-    self.flags.iter().fold(0, |acc, flag| acc | flag.as_byte())
-  }
+    fn flags_as_byte(&self) -> u8 {
+        self.flags.iter().fold(0, |acc, flag| acc | flag.as_byte())
+    }
 
-  #[allow(dead_code)]
-  fn parse_query_flags(byte: u8) -> Vec<QueryFlags> {
-    let mut flags: Vec<QueryFlags> = vec![];
+    #[allow(dead_code)]
+    fn parse_query_flags(byte: u8) -> Vec<QueryFlags> {
+        let mut flags: Vec<QueryFlags> = vec![];
 
-    if QueryFlags::has_value(byte) {
-      flags.push(QueryFlags::Value);
-    }
-    if QueryFlags::has_skip_metadata(byte) {
-      flags.push(QueryFlags::SkipMetadata);
-    }
-    if QueryFlags::has_page_size(byte) {
-      flags.push(QueryFlags::PageSize);
-    }
-    if QueryFlags::has_with_paging_state(byte) {
-      flags.push(QueryFlags::WithPagingState);
-    }
-    if QueryFlags::has_with_serial_consistency(byte) {
-      flags.push(QueryFlags::WithSerialConsistency);
-    }
-    if QueryFlags::has_with_default_timestamp(byte) {
-      flags.push(QueryFlags::WithDefaultTimestamp);
-    }
-    if QueryFlags::has_with_names_for_values(byte) {
-      flags.push(QueryFlags::WithNamesForValues);
-    }
+        if QueryFlags::has_value(byte) {
+            flags.push(QueryFlags::Value);
+        }
+        if QueryFlags::has_skip_metadata(byte) {
+            flags.push(QueryFlags::SkipMetadata);
+        }
+        if QueryFlags::has_page_size(byte) {
+            flags.push(QueryFlags::PageSize);
+        }
+        if QueryFlags::has_with_paging_state(byte) {
+            flags.push(QueryFlags::WithPagingState);
+        }
+        if QueryFlags::has_with_serial_consistency(byte) {
+            flags.push(QueryFlags::WithSerialConsistency);
+        }
+        if QueryFlags::has_with_default_timestamp(byte) {
+            flags.push(QueryFlags::WithDefaultTimestamp);
+        }
+        if QueryFlags::has_with_names_for_values(byte) {
+            flags.push(QueryFlags::WithNamesForValues);
+        }
 
-    flags
-  }
+        flags
+    }
 }
 
 impl IntoBytes for QueryParams {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v: Vec<u8> = vec![];
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v: Vec<u8> = vec![];
 
-    v.extend_from_slice(self.consistency.into_cbytes().as_slice());
-    v.push(self.flags_as_byte());
-    if QueryFlags::has_value(self.flags_as_byte()) {
-      if let Some(ref values) = self.values {
-        v.extend_from_slice(to_short(values.len() as i16).as_slice());
-        v.extend_from_slice(values.into_cbytes().as_slice());
-      }
-    }
-    if QueryFlags::has_page_size(self.flags_as_byte()) && self.page_size.is_some() {
-      // XXX clone
-      v.extend_from_slice(
-        to_int(
-          self
-            .page_size
-            .clone()
-            // unwrap is safe as we've checked that
-            // self.page_size.is_some()
-            .unwrap(),
-        )
-        .as_slice(),
-      );
-    }
-    if QueryFlags::has_with_paging_state(self.flags_as_byte()) && self.paging_state.is_some() {
-      // XXX clone
-      v.extend_from_slice(
-        self
-          .paging_state
-          .clone()
-          // unwrap is safe as we've checked that
-          // self.paging_state.is_some()
-          .unwrap()
-          .into_cbytes()
-          .as_slice(),
-      );
-    }
-    if QueryFlags::has_with_serial_consistency(self.flags_as_byte())
-      && self.serial_consistency.is_some()
-    {
-      // XXX clone
-      v.extend_from_slice(
-        self
-          .serial_consistency
-          .clone()
-          // unwrap is safe as we've checked that
-          // self.serial_consistency.is_some()
-          .unwrap()
-          .into_cbytes()
-          .as_slice(),
-      );
-    }
-    if QueryFlags::has_with_default_timestamp(self.flags_as_byte()) && self.timestamp.is_some() {
-      // unwrap is safe as we've checked that self.timestamp.is_some()
-      v.extend_from_slice(to_bigint(self.timestamp.unwrap()).as_slice());
-    }
+        v.extend_from_slice(self.consistency.into_cbytes().as_slice());
+        v.push(self.flags_as_byte());
+        if QueryFlags::has_value(self.flags_as_byte()) {
+            if let Some(ref values) = self.values {
+                v.extend_from_slice(to_short(values.len() as i16).as_slice());
+                v.extend_from_slice(values.into_cbytes().as_slice());
+            }
+        }
+        if QueryFlags::has_page_size(self.flags_as_byte()) && self.page_size.is_some() {
+            // XXX clone
+            v.extend_from_slice(
+                to_int(
+                    self.page_size
+                        .clone()
+                        // unwrap is safe as we've checked that
+                        // self.page_size.is_some()
+                        .unwrap(),
+                )
+                .as_slice(),
+            );
+        }
+        if QueryFlags::has_with_paging_state(self.flags_as_byte()) && self.paging_state.is_some() {
+            // XXX clone
+            v.extend_from_slice(
+                self.paging_state
+                    .clone()
+                    // unwrap is safe as we've checked that
+                    // self.paging_state.is_some()
+                    .unwrap()
+                    .into_cbytes()
+                    .as_slice(),
+            );
+        }
+        if QueryFlags::has_with_serial_consistency(self.flags_as_byte())
+            && self.serial_consistency.is_some()
+        {
+            // XXX clone
+            v.extend_from_slice(
+                self.serial_consistency
+                    .clone()
+                    // unwrap is safe as we've checked that
+                    // self.serial_consistency.is_some()
+                    .unwrap()
+                    .into_cbytes()
+                    .as_slice(),
+            );
+        }
+        if QueryFlags::has_with_default_timestamp(self.flags_as_byte()) && self.timestamp.is_some()
+        {
+            // unwrap is safe as we've checked that self.timestamp.is_some()
+            v.extend_from_slice(to_bigint(self.timestamp.unwrap()).as_slice());
+        }
 
-    v
-  }
+        v
+    }
 }
diff --git a/src/query/query_params_builder.rs b/src/query/query_params_builder.rs
index a0595d9..0dff27c 100644
--- a/src/query/query_params_builder.rs
+++ b/src/query/query_params_builder.rs
@@ -4,94 +4,94 @@ use crate::types::CBytes;
 
 #[derive(Debug, Default)]
 pub struct QueryParamsBuilder {
-  consistency: Consistency,
-  flags: Option<Vec<QueryFlags>>,
-  values: Option<QueryValues>,
-  with_names: Option<bool>,
-  page_size: Option<i32>,
-  paging_state: Option<CBytes>,
-  serial_consistency: Option<Consistency>,
-  timestamp: Option<i64>,
+    consistency: Consistency,
+    flags: Option<Vec<QueryFlags>>,
+    values: Option<QueryValues>,
+    with_names: Option<bool>,
+    page_size: Option<i32>,
+    paging_state: Option<CBytes>,
+    serial_consistency: Option<Consistency>,
+    timestamp: Option<i64>,
 }
 
 impl QueryParamsBuilder {
-  /// Factory function that returns new `QueryBuilder`.
-  /// Default consistency level is `One`
-  pub fn new() -> QueryParamsBuilder {
-    Default::default()
-  }
+    /// Factory function that returns new `QueryBuilder`.
+    /// Default consistency level is `One`
+    pub fn new() -> QueryParamsBuilder {
+        Default::default()
+    }
 
-  /// Sets new query consistency
-  pub fn consistency(mut self, consistency: Consistency) -> Self {
-    self.consistency = consistency;
+    /// Sets new query consistency
+    pub fn consistency(mut self, consistency: Consistency) -> Self {
+        self.consistency = consistency;
 
-    self
-  }
+        self
+    }
 
-  /// Sets new flags.
-  builder_opt_field!(flags, Vec<QueryFlags>);
+    /// Sets new flags.
+    builder_opt_field!(flags, Vec<QueryFlags>);
 
-  /// Sets new values.
-  /// Sets new query consistency
-  pub fn values(mut self, values: QueryValues) -> Self {
-    let with_names = values.with_names();
-    self.with_names = Some(with_names);
-    self.values = Some(values);
-    self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
-      flags.push(QueryFlags::Value);
-      if with_names {
-        flags.push(QueryFlags::WithNamesForValues);
-      }
-      flags
-    });
+    /// Sets new values.
+    /// Sets new query consistency
+    pub fn values(mut self, values: QueryValues) -> Self {
+        let with_names = values.with_names();
+        self.with_names = Some(with_names);
+        self.values = Some(values);
+        self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
+            flags.push(QueryFlags::Value);
+            if with_names {
+                flags.push(QueryFlags::WithNamesForValues);
+            }
+            flags
+        });
 
-    self
-  }
+        self
+    }
 
-  /// Sets new with_names parameter value.
-  builder_opt_field!(with_names, bool);
+    /// Sets new with_names parameter value.
+    builder_opt_field!(with_names, bool);
 
-  /// Sets new values.
-  /// Sets new query consistency
-  pub fn page_size(mut self, size: i32) -> Self {
-    self.page_size = Some(size);
-    self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
-      flags.push(QueryFlags::PageSize);
-      flags
-    });
+    /// Sets new values.
+    /// Sets new query consistency
+    pub fn page_size(mut self, size: i32) -> Self {
+        self.page_size = Some(size);
+        self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
+            flags.push(QueryFlags::PageSize);
+            flags
+        });
 
-    self
-  }
+        self
+    }
 
-  /// Sets new values.
-  /// Sets new query consistency
-  pub fn paging_state(mut self, state: CBytes) -> Self {
-    self.paging_state = Some(state);
-    self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
-      flags.push(QueryFlags::WithPagingState);
-      flags
-    });
+    /// Sets new values.
+    /// Sets new query consistency
+    pub fn paging_state(mut self, state: CBytes) -> Self {
+        self.paging_state = Some(state);
+        self.flags = self.flags.or(Some(vec![])).map(|mut flags| {
+            flags.push(QueryFlags::WithPagingState);
+            flags
+        });
 
-    self
-  }
+        self
+    }
 
-  /// Sets new serial_consistency value.
-  builder_opt_field!(serial_consistency, Consistency);
+    /// Sets new serial_consistency value.
+    builder_opt_field!(serial_consistency, Consistency);
 
-  /// Sets new timestamp value.
-  builder_opt_field!(timestamp, i64);
+    /// Sets new timestamp value.
+    builder_opt_field!(timestamp, i64);
 
-  /// Finalizes query building process and returns query itself
-  pub fn finalize(self) -> QueryParams {
-    QueryParams {
-      consistency: self.consistency,
-      flags: self.flags.unwrap_or(vec![]),
-      values: self.values,
-      with_names: self.with_names,
-      page_size: self.page_size,
-      paging_state: self.paging_state,
-      serial_consistency: self.serial_consistency,
-      timestamp: self.timestamp,
+    /// Finalizes query building process and returns query itself
+    pub fn finalize(self) -> QueryParams {
+        QueryParams {
+            consistency: self.consistency,
+            flags: self.flags.unwrap_or(vec![]),
+            values: self.values,
+            with_names: self.with_names,
+            page_size: self.page_size,
+            paging_state: self.paging_state,
+            serial_consistency: self.serial_consistency,
+            timestamp: self.timestamp,
+        }
     }
-  }
 }
diff --git a/src/query/query_values.rs b/src/query/query_values.rs
index 1a1f985..2230d8d 100644
--- a/src/query/query_values.rs
+++ b/src/query/query_values.rs
@@ -10,80 +10,82 @@ use crate::types::CString;
 /// * values with names
 #[derive(Debug, Clone)]
 pub enum QueryValues {
-  SimpleValues(Vec<Value>),
-  NamedValues(HashMap<String, Value>),
+    SimpleValues(Vec<Value>),
+    NamedValues(HashMap<String, Value>),
 }
 
 impl QueryValues {
-  /// It returns `true` if query values is with names and `false` otherwise.
-  pub fn with_names(&self) -> bool {
-    match *self {
-      QueryValues::SimpleValues(_) => false,
-      _ => true,
+    /// It returns `true` if query values is with names and `false` otherwise.
+    pub fn with_names(&self) -> bool {
+        match *self {
+            QueryValues::SimpleValues(_) => false,
+            _ => true,
+        }
     }
-  }
 
-  /// It return number of values.
-  pub fn len(&self) -> usize {
-    match *self {
-      QueryValues::SimpleValues(ref v) => v.len(),
-      QueryValues::NamedValues(ref m) => m.len(),
+    /// It return number of values.
+    pub fn len(&self) -> usize {
+        match *self {
+            QueryValues::SimpleValues(ref v) => v.len(),
+            QueryValues::NamedValues(ref m) => m.len(),
+        }
     }
-  }
 
-  fn named_value_into_bytes_fold(mut bytes: Vec<u8>, vals: (&String, &Value)) -> Vec<u8> {
-    let mut name_bytes = CString::new(vals.0.clone()).into_cbytes();
-    let mut vals_bytes = vals.1.into_cbytes();
-    bytes.append(&mut name_bytes);
-    bytes.append(&mut vals_bytes);
-    bytes
-  }
+    fn named_value_into_bytes_fold(mut bytes: Vec<u8>, vals: (&String, &Value)) -> Vec<u8> {
+        let mut name_bytes = CString::new(vals.0.clone()).into_cbytes();
+        let mut vals_bytes = vals.1.into_cbytes();
+        bytes.append(&mut name_bytes);
+        bytes.append(&mut vals_bytes);
+        bytes
+    }
 
-  fn value_into_bytes_fold(mut bytes: Vec<u8>, val: &Value) -> Vec<u8> {
-    let mut val_bytes = val.into_cbytes();
-    bytes.append(&mut val_bytes);
-    bytes
-  }
+    fn value_into_bytes_fold(mut bytes: Vec<u8>, val: &Value) -> Vec<u8> {
+        let mut val_bytes = val.into_cbytes();
+        bytes.append(&mut val_bytes);
+        bytes
+    }
 }
 
 impl<T: Into<Value> + Clone> From<Vec<T>> for QueryValues {
-  /// It converts values from `Vec` to query values without names `QueryValues::SimpleValues`.
-  fn from(values: Vec<T>) -> QueryValues {
-    let vals = values.iter().map(|v| v.clone().into());
-    QueryValues::SimpleValues(vals.collect())
-  }
+    /// It converts values from `Vec` to query values without names `QueryValues::SimpleValues`.
+    fn from(values: Vec<T>) -> QueryValues {
+        let vals = values.iter().map(|v| v.clone().into());
+        QueryValues::SimpleValues(vals.collect())
+    }
 }
 
 impl<'a, T: Into<Value> + Clone> From<&'a [T]> for QueryValues {
-  /// It converts values from `Vec` to query values without names `QueryValues::SimpleValues`.
-  fn from(values: &'a [T]) -> QueryValues {
-    let vals = values.iter().map(|v| v.clone().into());
-    QueryValues::SimpleValues(vals.collect())
-  }
+    /// It converts values from `Vec` to query values without names `QueryValues::SimpleValues`.
+    fn from(values: &'a [T]) -> QueryValues {
+        let vals = values.iter().map(|v| v.clone().into());
+        QueryValues::SimpleValues(vals.collect())
+    }
 }
 
 impl<S: ToString + Hash + Eq, V: Into<Value> + Clone> From<HashMap<S, V>> for QueryValues {
-  /// It converts values from `HashMap` to query values with names `QueryValues::NamedValues`.
-  fn from(values: HashMap<S, V>) -> QueryValues {
-    let map: HashMap<String, Value> = HashMap::with_capacity(values.len());
-    let _values = values.iter().fold(map, |mut acc, v| {
-      let name = v.0;
-      let val = v.1;
-      acc.insert(name.to_string(), val.clone().into());
-      acc
-    });
-    QueryValues::NamedValues(_values)
-  }
+    /// It converts values from `HashMap` to query values with names `QueryValues::NamedValues`.
+    fn from(values: HashMap<S, V>) -> QueryValues {
+        let map: HashMap<String, Value> = HashMap::with_capacity(values.len());
+        let _values = values.iter().fold(map, |mut acc, v| {
+            let name = v.0;
+            let val = v.1;
+            acc.insert(name.to_string(), val.clone().into());
+            acc
+        });
+        QueryValues::NamedValues(_values)
+    }
 }
 
 impl IntoBytes for QueryValues {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let bytes: Vec<u8> = vec![];
-    match *self {
-      QueryValues::SimpleValues(ref v) => v.iter().fold(bytes, QueryValues::value_into_bytes_fold),
-      QueryValues::NamedValues(ref v) => v
-        .iter()
-        .fold(bytes, QueryValues::named_value_into_bytes_fold),
+    fn into_cbytes(&self) -> Vec<u8> {
+        let bytes: Vec<u8> = vec![];
+        match *self {
+            QueryValues::SimpleValues(ref v) => {
+                v.iter().fold(bytes, QueryValues::value_into_bytes_fold)
+            }
+            QueryValues::NamedValues(ref v) => v
+                .iter()
+                .fold(bytes, QueryValues::named_value_into_bytes_fold),
+        }
     }
-  }
 }
diff --git a/src/query/utils.rs b/src/query/utils.rs
index 18a5fc6..5f31b20 100644
--- a/src/query/utils.rs
+++ b/src/query/utils.rs
@@ -7,51 +7,51 @@ use crate::frame::{Flag, Frame};
 use crate::transport::CDRSTransport;
 
 pub fn prepare_flags(with_tracing: bool, with_warnings: bool) -> Vec<Flag> {
-  let mut flags = vec![];
+    let mut flags = vec![];
 
-  if with_tracing {
-    flags.push(Flag::Tracing);
-  }
+    if with_tracing {
+        flags.push(Flag::Tracing);
+    }
 
-  if with_warnings {
-    flags.push(Flag::Warning);
-  }
+    if with_warnings {
+        flags.push(Flag::Warning);
+    }
 
-  flags
+    flags
 }
 
 pub fn send_frame<S, T, M>(sender: &S, frame_bytes: Vec<u8>) -> error::Result<Frame>
 where
-  S: GetConnection<T, M> + GetCompressor<'static> + Sized,
-  T: CDRSTransport + 'static,
-  M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
+    S: GetConnection<T, M> + GetCompressor<'static> + Sized,
+    T: CDRSTransport + 'static,
+    M: r2d2::ManageConnection<Connection = RefCell<T>, Error = error::Error> + Sized,
 {
-  let ref compression = sender.get_compressor();
-
-  sender
-    .get_connection()
-    .ok_or(error::Error::from("Unable to get transport"))
-    .and_then(|transport_cell| {
-      let write_res = transport_cell
-        .borrow_mut()
-        .write(frame_bytes.as_slice())
-        .map_err(error::Error::from);
-      write_res.map(|_| transport_cell)
-    })
-    .and_then(|transport_cell| from_connection(&transport_cell, compression))
+    let ref compression = sender.get_compressor();
+
+    sender
+        .get_connection()
+        .ok_or(error::Error::from("Unable to get transport"))
+        .and_then(|transport_cell| {
+            let write_res = transport_cell
+                .borrow_mut()
+                .write(frame_bytes.as_slice())
+                .map_err(error::Error::from);
+            write_res.map(|_| transport_cell)
+        })
+        .and_then(|transport_cell| from_connection(&transport_cell, compression))
 }
 
 #[cfg(test)]
 mod test {
-  use super::*;
-
-  #[test]
-  fn prepare_flags_test() {
-    assert_eq!(prepare_flags(true, false), vec![Flag::Tracing]);
-    assert_eq!(prepare_flags(false, true), vec![Flag::Warning]);
-    assert_eq!(
-      prepare_flags(true, true),
-      vec![Flag::Tracing, Flag::Warning]
-    );
-  }
+    use super::*;
+
+    #[test]
+    fn prepare_flags_test() {
+        assert_eq!(prepare_flags(true, false), vec![Flag::Tracing]);
+        assert_eq!(prepare_flags(false, true), vec![Flag::Warning]);
+        assert_eq!(
+            prepare_flags(true, true),
+            vec![Flag::Tracing, Flag::Warning]
+        );
+    }
 }
diff --git a/src/transport.rs b/src/transport.rs
index 5dace10..10f044b 100644
--- a/src/transport.rs
+++ b/src/transport.rs
@@ -11,13 +11,13 @@
 //!with Apache Cassandra server. **Note:** this option is available if and only if CDRS is imported
 //!with `ssl` feature.
 
+#[cfg(feature = "ssl")]
+use openssl::ssl::{SslConnector, SslStream};
 use std::io;
 use std::io::{Read, Write};
 use std::net;
 use std::net::TcpStream;
 use std::time::Duration;
-#[cfg(feature = "ssl")]
-use openssl::ssl::{SslConnector, SslStream};
 
 // TODO [v 2.x.x]: CDRSTransport: ... + BufReader + ButWriter + ...
 ///General CDRS transport trait. Both [`TranportTcp`][transportTcp]
@@ -62,9 +62,9 @@ impl TransportTcp {
     /// let tcp_transport = TransportTcp::new(addr).unwrap();
     /// ```
     pub fn new(addr: &str) -> io::Result<TransportTcp> {
-        TcpStream::connect(addr).map(|socket| {
-            TransportTcp { tcp: socket,
-                           addr: addr.to_string(), }
+        TcpStream::connect(addr).map(|socket| TransportTcp {
+            tcp: socket,
+            addr: addr.to_string(),
         })
     }
 }
@@ -87,9 +87,9 @@ impl Write for TransportTcp {
 
 impl CDRSTransport for TransportTcp {
     fn try_clone(&self) -> io::Result<TransportTcp> {
-        TcpStream::connect(self.addr.as_str()).map(|socket| {
-            TransportTcp { tcp: socket,
-                           addr: self.addr.clone(), }
+        TcpStream::connect(self.addr.as_str()).map(|socket| TransportTcp {
+            tcp: socket,
+            addr: self.addr.clone(),
         })
     }
 
@@ -98,7 +98,8 @@ impl CDRSTransport for TransportTcp {
     }
 
     fn set_timeout(&mut self, dur: Option<Duration>) -> io::Result<()> {
-        self.tcp.set_read_timeout(dur)
+        self.tcp
+            .set_read_timeout(dur)
             .and_then(|_| self.tcp.set_write_timeout(dur))
     }
 
@@ -119,15 +120,18 @@ impl TransportTls {
     pub fn new(addr: &str, connector: &SslConnector) -> io::Result<TransportTls> {
         let a: Vec<&str> = addr.split(':').collect();
         let res = net::TcpStream::connect(addr).map(|socket| {
-            connector.connect(a[0], socket).map(|sslsocket| {
-                TransportTls { ssl: sslsocket,
-                               connector: connector.clone(),
-                               addr: addr.to_string(), }
-            })
+            connector
+                .connect(a[0], socket)
+                .map(|sslsocket| TransportTls {
+                    ssl: sslsocket,
+                    connector: connector.clone(),
+                    addr: addr.to_string(),
+                })
         });
 
         res.and_then(|res| {
-            res.map(|n: TransportTls| n).map_err(|e| io::Error::new(io::ErrorKind::Other, e))
+            res.map(|n: TransportTls| n)
+                .map_err(|e| io::Error::new(io::ErrorKind::Other, e))
         })
     }
 }
@@ -158,34 +162,41 @@ impl CDRSTransport for TransportTls {
         let ip = match self.addr.split(":").nth(0) {
             Some(_ip) => _ip,
             None => {
-                return Err(io::Error::new(io::ErrorKind::Other,
-                                          "Wrong addess string - IP is missed"))
+                return Err(io::Error::new(
+                    io::ErrorKind::Other,
+                    "Wrong addess string - IP is missed",
+                ));
             }
         };
 
         let res = net::TcpStream::connect(self.addr.as_str()).map(|socket| {
-            self.connector.connect(ip, socket).map(|sslsocket| {
-                TransportTls { ssl: sslsocket,
-                               connector: self.connector.clone(),
-                               addr: self.addr.clone(), }
-            })
+            self.connector
+                .connect(ip, socket)
+                .map(|sslsocket| TransportTls {
+                    ssl: sslsocket,
+                    connector: self.connector.clone(),
+                    addr: self.addr.clone(),
+                })
         });
 
         res.and_then(|res| {
-            res.map(|n: TransportTls| n).map_err(|e| io::Error::new(io::ErrorKind::Other, e))
+            res.map(|n: TransportTls| n)
+                .map_err(|e| io::Error::new(io::ErrorKind::Other, e))
         })
     }
 
     fn close(&mut self, _close: net::Shutdown) -> io::Result<()> {
-        self.ssl.shutdown()
+        self.ssl
+            .shutdown()
             .map_err(|e| io::Error::new(io::ErrorKind::Other, e))
             .and_then(|_| Ok(()))
     }
 
     fn set_timeout(&mut self, dur: Option<Duration>) -> io::Result<()> {
         let stream = self.ssl.get_mut();
-        stream.set_read_timeout(dur)
-              .and_then(|_| stream.set_write_timeout(dur))
+        stream
+            .set_read_timeout(dur)
+            .and_then(|_| stream.set_write_timeout(dur))
     }
 
     fn is_alive(&self) -> bool {
diff --git a/src/types/data_serialization_types.rs b/src/types/data_serialization_types.rs
index 8b93756..b830b7d 100644
--- a/src/types/data_serialization_types.rs
+++ b/src/types/data_serialization_types.rs
@@ -13,46 +13,46 @@ use uuid;
 
 // Decodes Cassandra `ascii` data (bytes) into Rust's `Result<String, FromUtf8Error>`.
 pub fn decode_custom(bytes: &[u8]) -> Result<String, FromUtf8Error> {
-  Ok(String::from_utf8_lossy(bytes).into_owned())
+    Ok(String::from_utf8_lossy(bytes).into_owned())
 }
 
 // Decodes Cassandra `ascii` data (bytes) into Rust's `Result<String, FromUtf8Error>`.
 pub fn decode_ascii(bytes: &[u8]) -> Result<String, FromUtf8Error> {
-  Ok(String::from_utf8_lossy(bytes).into_owned())
+    Ok(String::from_utf8_lossy(bytes).into_owned())
 }
 
 // Decodes Cassandra `varchar` data (bytes) into Rust's `Result<String, FromUtf8Error>`.
 pub fn decode_varchar(bytes: &[u8]) -> Result<String, FromUtf8Error> {
-  Ok(String::from_utf8_lossy(bytes).into_owned())
+    Ok(String::from_utf8_lossy(bytes).into_owned())
 }
 
 // Decodes Cassandra `bigint` data (bytes) into Rust's `Result<i32, io::Error>`
 pub fn decode_bigint(bytes: &[u8]) -> Result<i64, io::Error> {
-  try_from_bytes(bytes).map(|i| i as i64)
+    try_from_bytes(bytes).map(|i| i as i64)
 }
 
 // Decodes Cassandra `blob` data (bytes) into Rust's `Result<Vec<u8>, io::Error>`
 pub fn decode_blob(bytes: &Vec<u8>) -> Result<Blob, io::Error> {
-  // in fact we just pass it through.
-  Ok(bytes.clone().into())
+    // in fact we just pass it through.
+    Ok(bytes.clone().into())
 }
 
 // Decodes Cassandra `boolean` data (bytes) into Rust's `Result<i32, io::Error>`
 pub fn decode_boolean(bytes: &[u8]) -> Result<bool, io::Error> {
-  let false_byte: u8 = 0;
-  if bytes.is_empty() {
-    Err(io::Error::new(
-      io::ErrorKind::UnexpectedEof,
-      "no bytes were found",
-    ))
-  } else {
-    Ok(bytes[0] != false_byte)
-  }
+    let false_byte: u8 = 0;
+    if bytes.is_empty() {
+        Err(io::Error::new(
+            io::ErrorKind::UnexpectedEof,
+            "no bytes were found",
+        ))
+    } else {
+        Ok(bytes[0] != false_byte)
+    }
 }
 
 // Decodes Cassandra `int` data (bytes) into Rust's `Result<i32, io::Error>`
 pub fn decode_int(bytes: &[u8]) -> Result<i32, io::Error> {
-  try_from_bytes(bytes).map(|i| i as i32)
+    try_from_bytes(bytes).map(|i| i as i32)
 }
 
 // Decodes Cassandra `date` data (bytes) into Rust's `Result<i32, io::Error>` in following way
@@ -60,56 +60,56 @@ pub fn decode_int(bytes: &[u8]) -> Result<i32, io::Error> {
 // 2^31: 1970-1-1
 // 2^32: 5881580-07-11
 pub fn decode_date(bytes: &[u8]) -> Result<i32, io::Error> {
-  try_from_bytes(bytes).map(|i| i as i32)
+    try_from_bytes(bytes).map(|i| i as i32)
 }
 
 // Decodes Cassandra `decimal` data (bytes) into Rust's `Result<f32, io::Error>`
 pub fn decode_decimal(bytes: &[u8]) -> Result<Decimal, io::Error> {
-  let lr = bytes.split_at(INT_LEN);
+    let lr = bytes.split_at(INT_LEN);
 
-  let scale = try_i_from_bytes(lr.0)? as u32;
-  let unscaled = try_i_from_bytes(lr.1)?;
+    let scale = try_i_from_bytes(lr.0)? as u32;
+    let unscaled = try_i_from_bytes(lr.1)?;
 
-  Ok(Decimal::new(unscaled, scale))
+    Ok(Decimal::new(unscaled, scale))
 }
 
 // Decodes Cassandra `double` data (bytes) into Rust's `Result<f32, io::Error>`
 pub fn decode_double(bytes: &[u8]) -> Result<f64, io::Error> {
-  try_f64_from_bytes(bytes)
+    try_f64_from_bytes(bytes)
 }
 
 // Decodes Cassandra `float` data (bytes) into Rust's `Result<f32, io::Error>`
 pub fn decode_float(bytes: &[u8]) -> Result<f32, io::Error> {
-  try_f32_from_bytes(bytes)
+    try_f32_from_bytes(bytes)
 }
 
 // Decodes Cassandra `inet` data (bytes) into Rust's `Result<net::IpAddr, io::Error>`
 pub fn decode_inet(bytes: &[u8]) -> Result<net::IpAddr, io::Error> {
-  match bytes.len() {
-    // v4
-    4 => Ok(net::IpAddr::V4(net::Ipv4Addr::new(
-      bytes[0], bytes[1], bytes[2], bytes[3],
-    ))),
-    // v6
-    16 => {
-      let a = from_u16_bytes(&bytes[0..2]);
-      let b = from_u16_bytes(&bytes[2..4]);
-      let c = from_u16_bytes(&bytes[4..6]);
-      let d = from_u16_bytes(&bytes[6..8]);
-      let e = from_u16_bytes(&bytes[8..10]);
-      let f = from_u16_bytes(&bytes[10..12]);
-      let g = from_u16_bytes(&bytes[12..14]);
-      let h = from_u16_bytes(&bytes[14..16]);
-      Ok(net::IpAddr::V6(net::Ipv6Addr::new(a, b, c, d, e, f, g, h)))
-    }
-    _ => {
-      // let message = format!("Unparseable  Ip address {:?}", bytes);
-      Err(io::Error::new(
-        io::ErrorKind::Other,
-        format!("Unparseable  Ip address {:?}", bytes),
-      ))
-    }
-  }
+    match bytes.len() {
+        // v4
+        4 => Ok(net::IpAddr::V4(net::Ipv4Addr::new(
+            bytes[0], bytes[1], bytes[2], bytes[3],
+        ))),
+        // v6
+        16 => {
+            let a = from_u16_bytes(&bytes[0..2]);
+            let b = from_u16_bytes(&bytes[2..4]);
+            let c = from_u16_bytes(&bytes[4..6]);
+            let d = from_u16_bytes(&bytes[6..8]);
+            let e = from_u16_bytes(&bytes[8..10]);
+            let f = from_u16_bytes(&bytes[10..12]);
+            let g = from_u16_bytes(&bytes[12..14]);
+            let h = from_u16_bytes(&bytes[14..16]);
+            Ok(net::IpAddr::V6(net::Ipv6Addr::new(a, b, c, d, e, f, g, h)))
+        }
+        _ => {
+            // let message = format!("Unparseable  Ip address {:?}", bytes);
+            Err(io::Error::new(
+                io::ErrorKind::Other,
+                format!("Unparseable  Ip address {:?}", bytes),
+            ))
+        }
+    }
 }
 
 // Decodes Cassandra `timestamp` data (bytes) into Rust's `Result<i64, io::Error>`
@@ -117,453 +117,453 @@ pub fn decode_inet(bytes: &[u8]) -> Result<net::IpAddr, io::Error> {
 //  offset from the unix epoch (00:00:00, January 1st, 1970).  Negative values
 //  represent a negative offset from the epoch.
 pub fn decode_timestamp(bytes: &[u8]) -> Result<i64, io::Error> {
-  try_from_bytes(bytes).map(|i| i as i64)
+    try_from_bytes(bytes).map(|i| i as i64)
 }
 
 // Decodes Cassandra `list` data (bytes) into Rust's `Result<Vec<CBytes>, io::Error>`
 pub fn decode_list(bytes: &[u8]) -> Result<Vec<CBytes>, io::Error> {
-  let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
-  let l =
-    CInt::from_cursor(&mut cursor).map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
-  let mut list = Vec::with_capacity(l as usize);
-  for _ in 0..l {
-    let b = CBytes::from_cursor(&mut cursor)
-      .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-    list.push(b);
-  }
-  Ok(list)
+    let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
+    let l = CInt::from_cursor(&mut cursor)
+        .map_err(|e| io::Error::new(io::ErrorKind::InvalidData, e))?;
+    let mut list = Vec::with_capacity(l as usize);
+    for _ in 0..l {
+        let b = CBytes::from_cursor(&mut cursor)
+            .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+        list.push(b);
+    }
+    Ok(list)
 }
 
 // Decodes Cassandra `set` data (bytes) into Rust's `Result<Vec<CBytes>, io::Error>`
 pub fn decode_set(bytes: &[u8]) -> Result<Vec<CBytes>, io::Error> {
-  decode_list(bytes)
+    decode_list(bytes)
 }
 
 // Decodes Cassandra `map` data (bytes) into Rust's `Result<Vec<(CBytes, CBytes)>, io::Error>`
 pub fn decode_map(bytes: &[u8]) -> Result<Vec<(CBytes, CBytes)>, io::Error> {
-  let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
-  let l = CInt::from_cursor(&mut cursor)
-    .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-  let mut map = Vec::with_capacity(l as usize);
-  for _ in 0..l {
-    let n = CBytes::from_cursor(&mut cursor)
-      .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-    let v = CBytes::from_cursor(&mut cursor)
-      .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-    map.push((n, v));
-  }
-  Ok(map)
+    let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
+    let l = CInt::from_cursor(&mut cursor)
+        .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+    let mut map = Vec::with_capacity(l as usize);
+    for _ in 0..l {
+        let n = CBytes::from_cursor(&mut cursor)
+            .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+        let v = CBytes::from_cursor(&mut cursor)
+            .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+        map.push((n, v));
+    }
+    Ok(map)
 }
 
 // Decodes Cassandra `smallint` data (bytes) into Rust's `Result<i16, io::Error>`
 pub fn decode_smallint(bytes: &[u8]) -> Result<i16, io::Error> {
-  try_from_bytes(bytes).map(|i| i as i16)
+    try_from_bytes(bytes).map(|i| i as i16)
 }
 
 // Decodes Cassandra `tinyint` data (bytes) into Rust's `Result<i8, io::Error>`
 pub fn decode_tinyint(bytes: &[u8]) -> Result<i8, io::Error> {
-  Ok(bytes[0] as i8)
+    Ok(bytes[0] as i8)
 }
 
 // Decodes Cassandra `text` data (bytes) into Rust's `Result<String, FromUtf8Error>`.
 pub fn decode_text(bytes: &[u8]) -> Result<String, FromUtf8Error> {
-  Ok(String::from_utf8_lossy(bytes).into_owned())
+    Ok(String::from_utf8_lossy(bytes).into_owned())
 }
 
 // Decodes Cassandra `time` data (bytes) into Rust's `Result<String, FromUtf8Error>`.
 pub fn decode_time(bytes: &[u8]) -> Result<i64, io::Error> {
-  try_i_from_bytes(bytes)
+    try_i_from_bytes(bytes)
 }
 
 // Decodes Cassandra `timeuuid` data (bytes) into Rust's `Result<uuid::Uuid, uuid::BytesError>`
 pub fn decode_timeuuid(bytes: &[u8]) -> Result<uuid::Uuid, uuid::BytesError> {
-  uuid::Uuid::from_slice(bytes)
+    uuid::Uuid::from_slice(bytes)
 }
 
 // Decodes Cassandra `varint` data (bytes) into Rust's `Result<i64, io::Error>`
 pub fn decode_varint(bytes: &[u8]) -> Result<i64, io::Error> {
-  try_i_from_bytes(bytes)
+    try_i_from_bytes(bytes)
 }
 
 // Decodes Cassandra `Udt` data (bytes) into Rust's `Result<Vec<CBytes>, io::Error>`
 // each `CBytes` is encoded type of field of user defined type
 pub fn decode_udt(bytes: &[u8], l: usize) -> Result<Vec<CBytes>, io::Error> {
-  let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
-  let mut udt = Vec::with_capacity(l);
-  for _ in 0..l {
-    let v = CBytes::from_cursor(&mut cursor)
-      .or_else(|err| match err {
-        error::Error::Io(io_err) => {
-          if io_err.kind() == io::ErrorKind::UnexpectedEof {
-            Ok(CBytes::new_empty())
-          } else {
-            Err(io_err.into())
-          }
-        }
-        _ => Err(err),
-      })
-      .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-    udt.push(v);
-  }
-  Ok(udt)
+    let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
+    let mut udt = Vec::with_capacity(l);
+    for _ in 0..l {
+        let v = CBytes::from_cursor(&mut cursor)
+            .or_else(|err| match err {
+                error::Error::Io(io_err) => {
+                    if io_err.kind() == io::ErrorKind::UnexpectedEof {
+                        Ok(CBytes::new_empty())
+                    } else {
+                        Err(io_err.into())
+                    }
+                }
+                _ => Err(err),
+            })
+            .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+        udt.push(v);
+    }
+    Ok(udt)
 }
 
 // Decodes Cassandra `Tuple` data (bytes) into Rust's `Result<Vec<CBytes>, io::Error>`
 // each `CBytes` is encoded type of field of user defined type
 pub fn decode_tuple(bytes: &[u8], l: usize) -> Result<Vec<CBytes>, io::Error> {
-  let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
-  let mut udt = Vec::with_capacity(l);
-  for _ in 0..l {
-    let v = CBytes::from_cursor(&mut cursor)
-      .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
-    udt.push(v);
-  }
-  Ok(udt)
+    let mut cursor: io::Cursor<&[u8]> = io::Cursor::new(bytes);
+    let mut udt = Vec::with_capacity(l);
+    for _ in 0..l {
+        let v = CBytes::from_cursor(&mut cursor)
+            .map_err(|err| io::Error::new(io::ErrorKind::InvalidData, err))?;
+        udt.push(v);
+    }
+    Ok(udt)
 }
 
 #[cfg(test)]
 mod tests {
-  use super::super::super::error::*;
-  use super::super::super::frame::frame_result::*;
-  use super::*;
-  use std::net::IpAddr;
-
-  #[test]
-  fn decode_custom_test() {
-    assert_eq!(decode_custom(b"abcd").unwrap(), "abcd".to_string());
-  }
-
-  #[test]
-  fn decode_ascii_test() {
-    assert_eq!(decode_ascii(b"abcd").unwrap(), "abcd".to_string());
-  }
-
-  #[test]
-  fn decode_varchar_test() {
-    assert_eq!(decode_varchar(b"abcd").unwrap(), "abcd".to_string());
-  }
-
-  #[test]
-  fn decode_bigint_test() {
-    assert_eq!(decode_bigint(&[0, 0, 0, 0, 0, 0, 0, 3]).unwrap(), 3);
-  }
-
-  #[test]
-  fn decode_blob_test() {
-    assert_eq!(
-      decode_blob(&vec![0, 0, 0, 3]).unwrap().into_vec(),
-      vec![0, 0, 0, 3]
-    );
-  }
-
-  #[test]
-  fn decode_boolean_test() {
-    assert_eq!(decode_boolean(&[0]).unwrap(), false);
-    assert_eq!(decode_boolean(&[1]).unwrap(), true);
-    assert!(decode_boolean(&[]).is_err());
-  }
-
-  #[test]
-  fn decode_int_test() {
-    assert_eq!(decode_int(&[0, 0, 0, 3]).unwrap(), 3);
-  }
-
-  #[test]
-  fn decode_date_test() {
-    assert_eq!(decode_date(&[0, 0, 0, 3]).unwrap(), 3);
-  }
-
-  #[test]
-  fn decode_double_test() {
-    let bytes = to_float_big(0.3);
-    assert_eq!(decode_double(bytes.as_slice()).unwrap(), 0.3);
-  }
-
-  #[test]
-  fn decode_float_test() {
-    let bytes = to_float(0.3);
-    assert_eq!(decode_float(bytes.as_slice()).unwrap(), 0.3);
-  }
-
-  #[test]
-  fn decode_inet_test() {
-    let bytes_v4 = &[0, 0, 0, 0];
-    match decode_inet(bytes_v4) {
-      Ok(IpAddr::V4(ref ip)) => assert_eq!(ip.octets(), [0, 0, 0, 0]),
-      _ => panic!("wrong ip v4 address"),
-    }
-
-    let bytes_v6 = &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
-    match decode_inet(bytes_v6) {
-      Ok(IpAddr::V6(ref ip)) => assert_eq!(ip.segments(), [0, 0, 0, 0, 0, 0, 0, 0]),
-      _ => panic!("wrong ip v6 address"),
-    };
-  }
-
-  #[test]
-  fn decode_timestamp_test() {
-    assert_eq!(decode_timestamp(&[0, 0, 0, 0, 0, 0, 0, 3]).unwrap(), 3);
-  }
-
-  #[test]
-  fn decode_list_test() {
-    let results = decode_list(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2]).unwrap();
-    assert_eq!(results.len(), 1);
-    assert_eq!(results[0].as_plain().unwrap(), vec![1, 2]);
-  }
-
-  #[test]
-  fn decode_set_test() {
-    let results = decode_set(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2]).unwrap();
-    assert_eq!(results.len(), 1);
-    assert_eq!(results[0].as_plain().unwrap(), vec![1, 2]);
-  }
-
-  #[test]
-  fn decode_map_test() {
-    let results = decode_map(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2, 0, 0, 0, 2, 2, 1]).unwrap();
-    assert_eq!(results.len(), 1);
-    assert_eq!(results[0].0.as_plain().unwrap(), vec![1, 2]);
-    assert_eq!(results[0].1.as_plain().unwrap(), vec![2, 1]);
-  }
-
-  #[test]
-  fn decode_smallint_test() {
-    assert_eq!(decode_smallint(&[0, 10]).unwrap(), 10);
-  }
-
-  #[test]
-  fn decode_tinyint_test() {
-    assert_eq!(decode_tinyint(&[10]).unwrap(), 10);
-  }
-
-  #[test]
-  fn decode_decimal_test() {
-    assert_eq!(
-      decode_decimal(&[0, 0, 0, 0, 10u8]).unwrap(),
-      Decimal::new(10, 0)
-    );
-
-    assert_eq!(
-      decode_decimal(&[0, 0, 0, 0, 0x00, 0x81]).unwrap(),
-      Decimal::new(129, 0)
-    );
-
-    assert_eq!(
-      decode_decimal(&[0, 0, 0, 0, 0xFF, 0x7F]).unwrap(),
-      Decimal::new(-129, 0)
-    );
-
-    assert_eq!(
-      decode_decimal(&[0, 0, 0, 1, 0x00, 0x81]).unwrap(),
-      Decimal::new(129, 1)
-    );
-
-    assert_eq!(
-      decode_decimal(&[0, 0, 0, 1, 0xFF, 0x7F]).unwrap(),
-      Decimal::new(-129, 1)
-    );
-  }
-
-  #[test]
-  fn decode_text_test() {
-    assert_eq!(decode_text(b"abcba").unwrap(), "abcba");
-  }
-
-  #[test]
-  fn decode_time_test() {
-    assert_eq!(decode_time(&[0, 0, 0, 0, 0, 0, 0, 10]).unwrap(), 10);
-  }
-
-  #[test]
-  fn decode_timeuuid_test() {
-    assert_eq!(
-      decode_timeuuid(&[4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, 87])
-        .unwrap()
-        .as_bytes(),
-      &[4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, 87]
-    );
-  }
-
-  #[test]
-  fn decode_varint_test() {
-    assert_eq!(decode_varint(&[0x00]).unwrap(), 0);
-    assert_eq!(decode_varint(&[0x01]).unwrap(), 1);
-    assert_eq!(decode_varint(&[0x7F]).unwrap(), 127);
-    assert_eq!(decode_varint(&[0x00, 0x80]).unwrap(), 128);
-    assert_eq!(decode_varint(&[0x00, 0x81]).unwrap(), 129);
-    assert_eq!(decode_varint(&[0xFF]).unwrap(), -1);
-    assert_eq!(decode_varint(&[0x80]).unwrap(), -128);
-    assert_eq!(decode_varint(&[0xFF, 0x7F]).unwrap(), -129);
-  }
-
-  #[test]
-  fn decode_udt_test() {
-    let udt = decode_udt(&[0, 0, 0, 2, 1, 2], 1).unwrap();
-    assert_eq!(udt.len(), 1);
-    assert_eq!(udt[0].as_plain().unwrap(), vec![1, 2]);
-  }
-
-  #[test]
-  fn as_rust_blob_test() {
-    let d_type = DataType { id: ColType::Blob };
-    let data = CBytes::new(vec![1, 2, 3]);
-    assert_eq!(
-      as_rust_type!(d_type, data, Blob)
-        .unwrap()
-        .unwrap()
-        .into_vec(),
-      vec![1, 2, 3]
-    );
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, Blob).is_err());
-  }
-
-  #[test]
-  fn as_rust_string_test() {
-    let type_custom = DataType {
-      id: ColType::Custom,
-    };
-    let type_ascii = DataType { id: ColType::Ascii };
-    let type_varchar = DataType {
-      id: ColType::Varchar,
-    };
-    let data = CBytes::new(b"abc".to_vec());
-    assert_eq!(
-      as_rust_type!(type_custom, data, String).unwrap().unwrap(),
-      "abc"
-    );
-    assert_eq!(
-      as_rust_type!(type_ascii, data, String).unwrap().unwrap(),
-      "abc"
-    );
-    assert_eq!(
-      as_rust_type!(type_varchar, data, String).unwrap().unwrap(),
-      "abc"
-    );
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, String).is_err());
-  }
-
-  #[test]
-  fn as_rust_bool_test() {
-    let type_boolean = DataType {
-      id: ColType::Boolean,
-    };
-    let data_true = CBytes::new(vec![1]);
-    let data_false = CBytes::new(vec![0]);
-    assert_eq!(
-      as_rust_type!(type_boolean, data_true, bool)
-        .unwrap()
-        .unwrap(),
-      true
-    );
-    assert_eq!(
-      as_rust_type!(type_boolean, data_false, bool)
-        .unwrap()
-        .unwrap(),
-      false
-    );
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data_false, bool).is_err());
-  }
-
-  #[test]
-  fn as_rust_i64_test() {
-    let type_bigint = DataType {
-      id: ColType::Bigint,
-    };
-    let type_timestamp = DataType {
-      id: ColType::Timestamp,
-    };
-    let type_time = DataType { id: ColType::Time };
-    let type_varint = DataType {
-      id: ColType::Varint,
-    };
-    let data = CBytes::new(vec![0, 0, 0, 0, 0, 0, 0, 100]);
-    assert_eq!(as_rust_type!(type_bigint, data, i64).unwrap().unwrap(), 100);
-    assert_eq!(
-      as_rust_type!(type_timestamp, data, i64).unwrap().unwrap(),
-      100
-    );
-    assert_eq!(as_rust_type!(type_time, data, i64).unwrap().unwrap(), 100);
-    assert_eq!(as_rust_type!(type_varint, data, i64).unwrap().unwrap(), 100);
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, i64).is_err());
-  }
-
-  #[test]
-  fn as_rust_i32_test() {
-    let type_int = DataType { id: ColType::Int };
-    let type_date = DataType { id: ColType::Date };
-    let data = CBytes::new(vec![0, 0, 0, 100]);
-    assert_eq!(as_rust_type!(type_int, data, i32).unwrap().unwrap(), 100);
-    assert_eq!(as_rust_type!(type_date, data, i32).unwrap().unwrap(), 100);
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, i32).is_err());
-  }
-
-  #[test]
-  fn as_rust_i16_test() {
-    let type_smallint = DataType {
-      id: ColType::Smallint,
-    };
-    let data = CBytes::new(vec![0, 100]);
-    assert_eq!(
-      as_rust_type!(type_smallint, data, i16).unwrap().unwrap(),
-      100
-    );
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, i16).is_err());
-  }
-
-  #[test]
-  fn as_rust_i8_test() {
-    let type_tinyint = DataType {
-      id: ColType::Tinyint,
-    };
-    let data = CBytes::new(vec![100]);
-    assert_eq!(as_rust_type!(type_tinyint, data, i8).unwrap().unwrap(), 100);
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, i8).is_err());
-  }
-
-  #[test]
-  fn as_rust_f64_test() {
-    let type_double = DataType {
-      id: ColType::Double,
-    };
-    let data = CBytes::new(to_float_big(0.1 as f64));
-    assert_eq!(as_rust_type!(type_double, data, f64).unwrap().unwrap(), 0.1);
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, f64).is_err());
-  }
-
-  #[test]
-  fn as_rust_f32_test() {
-    // let type_decimal = DataType { id: ColType::Decimal };
-    let type_float = DataType { id: ColType::Float };
-    let data = CBytes::new(to_float(0.1 as f32));
-    // assert_eq!(as_rust_type!(type_decimal, data, f32).unwrap(), 100.0);
-    assert_eq!(as_rust_type!(type_float, data, f32).unwrap().unwrap(), 0.1);
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, f32).is_err());
-  }
-
-  #[test]
-  fn as_rust_inet_test() {
-    let type_inet = DataType { id: ColType::Inet };
-    let data = CBytes::new(vec![0, 0, 0, 0]);
-
-    match as_rust_type!(type_inet, data, IpAddr) {
-      Ok(Some(IpAddr::V4(ref ip))) => assert_eq!(ip.octets(), [0, 0, 0, 0]),
-      _ => panic!("wrong ip v4 address"),
-    }
-    let wrong_type = DataType { id: ColType::Map };
-    assert!(as_rust_type!(wrong_type, data, f32).is_err());
-  }
-
-  struct DataType {
-    id: ColType,
-  }
+    use super::super::super::error::*;
+    use super::super::super::frame::frame_result::*;
+    use super::*;
+    use std::net::IpAddr;
+
+    #[test]
+    fn decode_custom_test() {
+        assert_eq!(decode_custom(b"abcd").unwrap(), "abcd".to_string());
+    }
+
+    #[test]
+    fn decode_ascii_test() {
+        assert_eq!(decode_ascii(b"abcd").unwrap(), "abcd".to_string());
+    }
+
+    #[test]
+    fn decode_varchar_test() {
+        assert_eq!(decode_varchar(b"abcd").unwrap(), "abcd".to_string());
+    }
+
+    #[test]
+    fn decode_bigint_test() {
+        assert_eq!(decode_bigint(&[0, 0, 0, 0, 0, 0, 0, 3]).unwrap(), 3);
+    }
+
+    #[test]
+    fn decode_blob_test() {
+        assert_eq!(
+            decode_blob(&vec![0, 0, 0, 3]).unwrap().into_vec(),
+            vec![0, 0, 0, 3]
+        );
+    }
+
+    #[test]
+    fn decode_boolean_test() {
+        assert_eq!(decode_boolean(&[0]).unwrap(), false);
+        assert_eq!(decode_boolean(&[1]).unwrap(), true);
+        assert!(decode_boolean(&[]).is_err());
+    }
+
+    #[test]
+    fn decode_int_test() {
+        assert_eq!(decode_int(&[0, 0, 0, 3]).unwrap(), 3);
+    }
+
+    #[test]
+    fn decode_date_test() {
+        assert_eq!(decode_date(&[0, 0, 0, 3]).unwrap(), 3);
+    }
+
+    #[test]
+    fn decode_double_test() {
+        let bytes = to_float_big(0.3);
+        assert_eq!(decode_double(bytes.as_slice()).unwrap(), 0.3);
+    }
+
+    #[test]
+    fn decode_float_test() {
+        let bytes = to_float(0.3);
+        assert_eq!(decode_float(bytes.as_slice()).unwrap(), 0.3);
+    }
+
+    #[test]
+    fn decode_inet_test() {
+        let bytes_v4 = &[0, 0, 0, 0];
+        match decode_inet(bytes_v4) {
+            Ok(IpAddr::V4(ref ip)) => assert_eq!(ip.octets(), [0, 0, 0, 0]),
+            _ => panic!("wrong ip v4 address"),
+        }
+
+        let bytes_v6 = &[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
+        match decode_inet(bytes_v6) {
+            Ok(IpAddr::V6(ref ip)) => assert_eq!(ip.segments(), [0, 0, 0, 0, 0, 0, 0, 0]),
+            _ => panic!("wrong ip v6 address"),
+        };
+    }
+
+    #[test]
+    fn decode_timestamp_test() {
+        assert_eq!(decode_timestamp(&[0, 0, 0, 0, 0, 0, 0, 3]).unwrap(), 3);
+    }
+
+    #[test]
+    fn decode_list_test() {
+        let results = decode_list(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2]).unwrap();
+        assert_eq!(results.len(), 1);
+        assert_eq!(results[0].as_plain().unwrap(), vec![1, 2]);
+    }
+
+    #[test]
+    fn decode_set_test() {
+        let results = decode_set(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2]).unwrap();
+        assert_eq!(results.len(), 1);
+        assert_eq!(results[0].as_plain().unwrap(), vec![1, 2]);
+    }
+
+    #[test]
+    fn decode_map_test() {
+        let results = decode_map(&[0, 0, 0, 1, 0, 0, 0, 2, 1, 2, 0, 0, 0, 2, 2, 1]).unwrap();
+        assert_eq!(results.len(), 1);
+        assert_eq!(results[0].0.as_plain().unwrap(), vec![1, 2]);
+        assert_eq!(results[0].1.as_plain().unwrap(), vec![2, 1]);
+    }
+
+    #[test]
+    fn decode_smallint_test() {
+        assert_eq!(decode_smallint(&[0, 10]).unwrap(), 10);
+    }
+
+    #[test]
+    fn decode_tinyint_test() {
+        assert_eq!(decode_tinyint(&[10]).unwrap(), 10);
+    }
+
+    #[test]
+    fn decode_decimal_test() {
+        assert_eq!(
+            decode_decimal(&[0, 0, 0, 0, 10u8]).unwrap(),
+            Decimal::new(10, 0)
+        );
+
+        assert_eq!(
+            decode_decimal(&[0, 0, 0, 0, 0x00, 0x81]).unwrap(),
+            Decimal::new(129, 0)
+        );
+
+        assert_eq!(
+            decode_decimal(&[0, 0, 0, 0, 0xFF, 0x7F]).unwrap(),
+            Decimal::new(-129, 0)
+        );
+
+        assert_eq!(
+            decode_decimal(&[0, 0, 0, 1, 0x00, 0x81]).unwrap(),
+            Decimal::new(129, 1)
+        );
+
+        assert_eq!(
+            decode_decimal(&[0, 0, 0, 1, 0xFF, 0x7F]).unwrap(),
+            Decimal::new(-129, 1)
+        );
+    }
+
+    #[test]
+    fn decode_text_test() {
+        assert_eq!(decode_text(b"abcba").unwrap(), "abcba");
+    }
+
+    #[test]
+    fn decode_time_test() {
+        assert_eq!(decode_time(&[0, 0, 0, 0, 0, 0, 0, 10]).unwrap(), 10);
+    }
+
+    #[test]
+    fn decode_timeuuid_test() {
+        assert_eq!(
+            decode_timeuuid(&[4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, 87])
+                .unwrap()
+                .as_bytes(),
+            &[4, 54, 67, 12, 43, 2, 98, 76, 32, 50, 87, 5, 1, 33, 43, 87]
+        );
+    }
+
+    #[test]
+    fn decode_varint_test() {
+        assert_eq!(decode_varint(&[0x00]).unwrap(), 0);
+        assert_eq!(decode_varint(&[0x01]).unwrap(), 1);
+        assert_eq!(decode_varint(&[0x7F]).unwrap(), 127);
+        assert_eq!(decode_varint(&[0x00, 0x80]).unwrap(), 128);
+        assert_eq!(decode_varint(&[0x00, 0x81]).unwrap(), 129);
+        assert_eq!(decode_varint(&[0xFF]).unwrap(), -1);
+        assert_eq!(decode_varint(&[0x80]).unwrap(), -128);
+        assert_eq!(decode_varint(&[0xFF, 0x7F]).unwrap(), -129);
+    }
+
+    #[test]
+    fn decode_udt_test() {
+        let udt = decode_udt(&[0, 0, 0, 2, 1, 2], 1).unwrap();
+        assert_eq!(udt.len(), 1);
+        assert_eq!(udt[0].as_plain().unwrap(), vec![1, 2]);
+    }
+
+    #[test]
+    fn as_rust_blob_test() {
+        let d_type = DataType { id: ColType::Blob };
+        let data = CBytes::new(vec![1, 2, 3]);
+        assert_eq!(
+            as_rust_type!(d_type, data, Blob)
+                .unwrap()
+                .unwrap()
+                .into_vec(),
+            vec![1, 2, 3]
+        );
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, Blob).is_err());
+    }
+
+    #[test]
+    fn as_rust_string_test() {
+        let type_custom = DataType {
+            id: ColType::Custom,
+        };
+        let type_ascii = DataType { id: ColType::Ascii };
+        let type_varchar = DataType {
+            id: ColType::Varchar,
+        };
+        let data = CBytes::new(b"abc".to_vec());
+        assert_eq!(
+            as_rust_type!(type_custom, data, String).unwrap().unwrap(),
+            "abc"
+        );
+        assert_eq!(
+            as_rust_type!(type_ascii, data, String).unwrap().unwrap(),
+            "abc"
+        );
+        assert_eq!(
+            as_rust_type!(type_varchar, data, String).unwrap().unwrap(),
+            "abc"
+        );
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, String).is_err());
+    }
+
+    #[test]
+    fn as_rust_bool_test() {
+        let type_boolean = DataType {
+            id: ColType::Boolean,
+        };
+        let data_true = CBytes::new(vec![1]);
+        let data_false = CBytes::new(vec![0]);
+        assert_eq!(
+            as_rust_type!(type_boolean, data_true, bool)
+                .unwrap()
+                .unwrap(),
+            true
+        );
+        assert_eq!(
+            as_rust_type!(type_boolean, data_false, bool)
+                .unwrap()
+                .unwrap(),
+            false
+        );
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data_false, bool).is_err());
+    }
+
+    #[test]
+    fn as_rust_i64_test() {
+        let type_bigint = DataType {
+            id: ColType::Bigint,
+        };
+        let type_timestamp = DataType {
+            id: ColType::Timestamp,
+        };
+        let type_time = DataType { id: ColType::Time };
+        let type_varint = DataType {
+            id: ColType::Varint,
+        };
+        let data = CBytes::new(vec![0, 0, 0, 0, 0, 0, 0, 100]);
+        assert_eq!(as_rust_type!(type_bigint, data, i64).unwrap().unwrap(), 100);
+        assert_eq!(
+            as_rust_type!(type_timestamp, data, i64).unwrap().unwrap(),
+            100
+        );
+        assert_eq!(as_rust_type!(type_time, data, i64).unwrap().unwrap(), 100);
+        assert_eq!(as_rust_type!(type_varint, data, i64).unwrap().unwrap(), 100);
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, i64).is_err());
+    }
+
+    #[test]
+    fn as_rust_i32_test() {
+        let type_int = DataType { id: ColType::Int };
+        let type_date = DataType { id: ColType::Date };
+        let data = CBytes::new(vec![0, 0, 0, 100]);
+        assert_eq!(as_rust_type!(type_int, data, i32).unwrap().unwrap(), 100);
+        assert_eq!(as_rust_type!(type_date, data, i32).unwrap().unwrap(), 100);
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, i32).is_err());
+    }
+
+    #[test]
+    fn as_rust_i16_test() {
+        let type_smallint = DataType {
+            id: ColType::Smallint,
+        };
+        let data = CBytes::new(vec![0, 100]);
+        assert_eq!(
+            as_rust_type!(type_smallint, data, i16).unwrap().unwrap(),
+            100
+        );
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, i16).is_err());
+    }
+
+    #[test]
+    fn as_rust_i8_test() {
+        let type_tinyint = DataType {
+            id: ColType::Tinyint,
+        };
+        let data = CBytes::new(vec![100]);
+        assert_eq!(as_rust_type!(type_tinyint, data, i8).unwrap().unwrap(), 100);
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, i8).is_err());
+    }
+
+    #[test]
+    fn as_rust_f64_test() {
+        let type_double = DataType {
+            id: ColType::Double,
+        };
+        let data = CBytes::new(to_float_big(0.1 as f64));
+        assert_eq!(as_rust_type!(type_double, data, f64).unwrap().unwrap(), 0.1);
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, f64).is_err());
+    }
+
+    #[test]
+    fn as_rust_f32_test() {
+        // let type_decimal = DataType { id: ColType::Decimal };
+        let type_float = DataType { id: ColType::Float };
+        let data = CBytes::new(to_float(0.1 as f32));
+        // assert_eq!(as_rust_type!(type_decimal, data, f32).unwrap(), 100.0);
+        assert_eq!(as_rust_type!(type_float, data, f32).unwrap().unwrap(), 0.1);
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, f32).is_err());
+    }
+
+    #[test]
+    fn as_rust_inet_test() {
+        let type_inet = DataType { id: ColType::Inet };
+        let data = CBytes::new(vec![0, 0, 0, 0]);
+
+        match as_rust_type!(type_inet, data, IpAddr) {
+            Ok(Some(IpAddr::V4(ref ip))) => assert_eq!(ip.octets(), [0, 0, 0, 0]),
+            _ => panic!("wrong ip v4 address"),
+        }
+        let wrong_type = DataType { id: ColType::Map };
+        assert!(as_rust_type!(wrong_type, data, f32).is_err());
+    }
+
+    struct DataType {
+        id: ColType,
+    }
 }
diff --git a/src/types/decimal.rs b/src/types/decimal.rs
index 7f678c8..de9cb26 100644
--- a/src/types/decimal.rs
+++ b/src/types/decimal.rs
@@ -4,42 +4,42 @@ use crate::frame::traits::IntoBytes;
 /// Cassandra Decimal type
 #[derive(Debug, Clone, PartialEq)]
 pub struct Decimal {
-  pub unscaled: i64,
-  pub scale: u32,
+    pub unscaled: i64,
+    pub scale: u32,
 }
 
 impl Decimal {
-  pub fn new(unscaled: i64, scale: u32) -> Self {
-    Decimal { unscaled, scale }
-  }
-
-  /// Method that returns plain `f64` value.
-  pub fn as_plain(&self) -> f64 {
-    (self.unscaled as f64) / (10i64.pow(self.scale) as f64)
-  }
+    pub fn new(unscaled: i64, scale: u32) -> Self {
+        Decimal { unscaled, scale }
+    }
+
+    /// Method that returns plain `f64` value.
+    pub fn as_plain(&self) -> f64 {
+        (self.unscaled as f64) / (10i64.pow(self.scale) as f64)
+    }
 }
 
 impl IntoBytes for Decimal {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut bytes: Vec<u8> = vec![];
-    bytes.extend(to_int(self.scale as i32));
-    bytes.extend(to_varint(self.unscaled));
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut bytes: Vec<u8> = vec![];
+        bytes.extend(to_int(self.scale as i32));
+        bytes.extend(to_varint(self.unscaled));
 
-    bytes
-  }
+        bytes
+    }
 }
 
 macro_rules! impl_from_for_decimal {
-  ($t:ty) => {
-    impl From<$t> for Decimal {
-      fn from(i: $t) -> Self {
-        Decimal {
-          unscaled: i as i64,
-          scale: 0,
+    ($t:ty) => {
+        impl From<$t> for Decimal {
+            fn from(i: $t) -> Self {
+                Decimal {
+                    unscaled: i as i64,
+                    scale: 0,
+                }
+            }
         }
-      }
-    }
-  };
+    };
 }
 
 impl_from_for_decimal!(i8);
@@ -50,80 +50,80 @@ impl_from_for_decimal!(u8);
 impl_from_for_decimal!(u16);
 
 impl From<f32> for Decimal {
-  fn from(f: f32) -> Decimal {
-    let mut scale: u32 = 0;
+    fn from(f: f32) -> Decimal {
+        let mut scale: u32 = 0;
 
-    loop {
-      let unscaled = f * (10i64.pow(scale) as f32);
+        loop {
+            let unscaled = f * (10i64.pow(scale) as f32);
 
-      if unscaled == unscaled.trunc() {
-        return Decimal::new(unscaled as i64, scale);
-      }
+            if unscaled == unscaled.trunc() {
+                return Decimal::new(unscaled as i64, scale);
+            }
 
-      scale += 1;
+            scale += 1;
+        }
     }
-  }
 }
 
 impl From<f64> for Decimal {
-  fn from(f: f64) -> Decimal {
-    let mut scale: u32 = 0;
+    fn from(f: f64) -> Decimal {
+        let mut scale: u32 = 0;
 
-    loop {
-      let unscaled = f * (10i64.pow(scale) as f64);
+        loop {
+            let unscaled = f * (10i64.pow(scale) as f64);
 
-      if unscaled == unscaled.trunc() {
-        return Decimal::new(unscaled as i64, scale);
-      }
+            if unscaled == unscaled.trunc() {
+                return Decimal::new(unscaled as i64, scale);
+            }
 
-      scale += 1;
+            scale += 1;
+        }
     }
-  }
 }
 
 #[cfg(test)]
 mod test {
-  use super::*;
-
-  #[test]
-  fn into_cbytes_test() {
-    assert_eq!(
-      Decimal::new(129, 0).into_cbytes(),
-      vec![0, 0, 0, 0, 0x00, 0x81]
-    );
-
-    assert_eq!(
-      Decimal::new(-129, 0).into_cbytes(),
-      vec![0, 0, 0, 0, 0xFF, 0x7F]
-    );
-
-    let expected: Vec<u8> = vec![0, 0, 0, 1, 0x00, 0x81];
-    assert_eq!(Decimal::new(129, 1).into_cbytes(), expected);
-
-    let expected: Vec<u8> = vec![0, 0, 0, 1, 0xFF, 0x7F];
-    assert_eq!(Decimal::new(-129, 1).into_cbytes(), expected);
-  }
-
-  #[test]
-  fn from_f32() {
-    assert_eq!(Decimal::from(12300001 as f32), Decimal::new(12300001, 0));
-    assert_eq!(Decimal::from(1230000.1 as f32), Decimal::new(12300001, 1));
-    assert_eq!(Decimal::from(0.12300001 as f32), Decimal::new(12300001, 8));
-  }
-
-  #[test]
-  fn from_f64() {
-    assert_eq!(
-      Decimal::from(1230000000000001i64 as f64),
-      Decimal::new(1230000000000001i64, 0)
-    );
-    assert_eq!(
-      Decimal::from(123000000000000.1f64),
-      Decimal::new(1230000000000001i64, 1)
-    );
-    assert_eq!(
-      Decimal::from(0.1230000000000001f64),
-      Decimal::new(1230000000000001i64, 16)
-    );
-  }
+    use super::*;
+
+    #[test]
+    fn into_cbytes_test() {
+        assert_eq!(
+            Decimal::new(129, 0).into_cbytes(),
+            vec![0, 0, 0, 0, 0x00, 0x81]
+        );
+
+        assert_eq!(
+            Decimal::new(-129, 0).into_cbytes(),
+            vec![0, 0, 0, 0, 0xFF, 0x7F]
+        );
+
+        let expected: Vec<u8> = vec![0, 0, 0, 1, 0x00, 0x81];
+        assert_eq!(Decimal::new(129, 1).into_cbytes(), expected);
+
+        let expected: Vec<u8> = vec![0, 0, 0, 1, 0xFF, 0x7F];
+        assert_eq!(Decimal::new(-129, 1).into_cbytes(), expected);
+    }
+
+    #[test]
+    fn from_f32() {
+        assert_eq!(Decimal::from(12300001 as f32), Decimal::new(12300001, 0));
+        assert_eq!(Decimal::from(1230000.1 as f32), Decimal::new(12300001, 1));
+        assert_eq!(Decimal::from(0.12300001 as f32), Decimal::new(12300001, 8));
+    }
+
+    #[test]
+    fn from_f64() {
+        assert_eq!(
+            Decimal::from(1230000000000001i64 as f64),
+            Decimal::new(1230000000000001i64, 0)
+        );
+        assert_eq!(
+            Decimal::from(123000000000000.1f64),
+            Decimal::new(1230000000000001i64, 1)
+        );
+        assert_eq!(
+            Decimal::from(0.1230000000000001f64),
+            Decimal::new(1230000000000001i64, 16)
+        );
+    }
 }
diff --git a/src/types/from_cdrs.rs b/src/types/from_cdrs.rs
index 804ef4e..dc58e8c 100644
--- a/src/types/from_cdrs.rs
+++ b/src/types/from_cdrs.rs
@@ -12,21 +12,21 @@ use crate::types::udt::UDT;
 use crate::types::{AsRustType, ByName, IntoRustByName};
 
 pub trait FromCDRS {
-  fn from_cdrs<T>(cdrs_type: T) -> CDRSResult<Option<Self>>
-  where
-    Self: Sized,
-    T: AsRustType<Self> + Sized,
-  {
-    cdrs_type.as_rust_type()
-  }
+    fn from_cdrs<T>(cdrs_type: T) -> CDRSResult<Option<Self>>
+    where
+        Self: Sized,
+        T: AsRustType<Self> + Sized,
+    {
+        cdrs_type.as_rust_type()
+    }
 
-  fn from_cdrs_r<T>(cdrs_type: T) -> CDRSResult<Self>
-  where
-    Self: Sized,
-    T: AsRustType<Self> + Sized,
-  {
-    cdrs_type.as_r_type()
-  }
+    fn from_cdrs_r<T>(cdrs_type: T) -> CDRSResult<Self>
+    where
+        Self: Sized,
+        T: AsRustType<Self> + Sized,
+    {
+        cdrs_type.as_r_type()
+    }
 }
 
 impl FromCDRS for Blob {}
@@ -48,21 +48,21 @@ impl FromCDRS for Timespec {}
 impl FromCDRS for Decimal {}
 
 pub trait FromCDRSByName {
-  fn from_cdrs_by_name<T>(cdrs_type: &T, name: &str) -> CDRSResult<Option<Self>>
-  where
-    Self: Sized,
-    T: ByName + IntoRustByName<Self> + Sized,
-  {
-    cdrs_type.by_name(name)
-  }
+    fn from_cdrs_by_name<T>(cdrs_type: &T, name: &str) -> CDRSResult<Option<Self>>
+    where
+        Self: Sized,
+        T: ByName + IntoRustByName<Self> + Sized,
+    {
+        cdrs_type.by_name(name)
+    }
 
-  fn from_cdrs_r<T>(cdrs_type: &T, name: &str) -> CDRSResult<Self>
-  where
-    Self: Sized,
-    T: ByName + IntoRustByName<Self> + Sized + ::std::fmt::Debug,
-  {
-    cdrs_type.r_by_name(name)
-  }
+    fn from_cdrs_r<T>(cdrs_type: &T, name: &str) -> CDRSResult<Self>
+    where
+        Self: Sized,
+        T: ByName + IntoRustByName<Self> + Sized + ::std::fmt::Debug,
+    {
+        cdrs_type.r_by_name(name)
+    }
 }
 
 impl FromCDRSByName for Blob {}
diff --git a/src/types/list.rs b/src/types/list.rs
index ba1701c..3619766 100644
--- a/src/types/list.rs
+++ b/src/types/list.rs
@@ -13,26 +13,26 @@ use uuid::Uuid;
 // TODO: consider using pointers to ColTypeOption and Vec<CBytes> instead of owning them.
 #[derive(Debug)]
 pub struct List {
-  /// column spec of the list, i.e. id should be List as it's a list and value should contain
-  /// a type of list items.
-  metadata: ColTypeOption,
-  data: Vec<CBytes>,
+    /// column spec of the list, i.e. id should be List as it's a list and value should contain
+    /// a type of list items.
+    metadata: ColTypeOption,
+    data: Vec<CBytes>,
 }
 
 impl List {
-  pub fn new(data: Vec<CBytes>, metadata: ColTypeOption) -> List {
-    List {
-      metadata: metadata,
-      data: data,
+    pub fn new(data: Vec<CBytes>, metadata: ColTypeOption) -> List {
+        List {
+            metadata: metadata,
+            data: data,
+        }
     }
-  }
 
-  fn map<T, F>(&self, f: F) -> Vec<T>
-  where
-    F: FnMut(&CBytes) -> T,
-  {
-    self.data.iter().map(f).collect()
-  }
+    fn map<T, F>(&self, f: F) -> Vec<T>
+    where
+        F: FnMut(&CBytes) -> T,
+    {
+        self.data.iter().map(f).collect()
+    }
 }
 
 impl AsRust for List {}
diff --git a/src/types/map.rs b/src/types/map.rs
index da801ed..f4bd029 100644
--- a/src/types/map.rs
+++ b/src/types/map.rs
@@ -15,18 +15,18 @@ use crate::types::{AsRust, AsRustType, CBytes};
 
 #[derive(Debug)]
 pub struct Map {
-  metadata: ColTypeOption,
-  data: Vec<(CBytes, CBytes)>,
+    metadata: ColTypeOption,
+    data: Vec<(CBytes, CBytes)>,
 }
 
 impl Map {
-  /// Creates new `Map` using the provided data and key and value types.
-  pub fn new(data: Vec<(CBytes, CBytes)>, meta: ColTypeOption) -> Map {
-    Map {
-      metadata: meta,
-      data: data,
+    /// Creates new `Map` using the provided data and key and value types.
+    pub fn new(data: Vec<(CBytes, CBytes)>, meta: ColTypeOption) -> Map {
+        Map {
+            metadata: meta,
+            data: data,
+        }
     }
-  }
 }
 
 impl AsRust for Map {}
diff --git a/src/types/mod.rs b/src/types/mod.rs
index 5ffb58f..136d56a 100644
--- a/src/types/mod.rs
+++ b/src/types/mod.rs
@@ -26,112 +26,106 @@ pub mod udt;
 pub mod value;
 
 pub mod prelude {
-  pub use crate::error::{Error, Result};
-  pub use crate::frame::{TryFromRow, TryFromUDT};
-  pub use crate::types::blob::Blob;
-  pub use crate::types::decimal::Decimal;
-  pub use crate::types::list::List;
-  pub use crate::types::map::Map;
-  pub use crate::types::rows::Row;
-  pub use crate::types::tuple::Tuple;
-  pub use crate::types::udt::UDT;
-  pub use crate::types::value::{Bytes, Value};
-  pub use crate::types::AsRustType;
+    pub use crate::error::{Error, Result};
+    pub use crate::frame::{TryFromRow, TryFromUDT};
+    pub use crate::types::blob::Blob;
+    pub use crate::types::decimal::Decimal;
+    pub use crate::types::list::List;
+    pub use crate::types::map::Map;
+    pub use crate::types::rows::Row;
+    pub use crate::types::tuple::Tuple;
+    pub use crate::types::udt::UDT;
+    pub use crate::types::value::{Bytes, Value};
+    pub use crate::types::AsRustType;
 }
 
 /// Should be used to represent a single column as a Rust value.
 pub trait AsRustType<T> {
-  fn as_rust_type(&self) -> CDRSResult<Option<T>>;
+    fn as_rust_type(&self) -> CDRSResult<Option<T>>;
 
-  fn as_r_type(&self) -> CDRSResult<T> {
-    self
-      .as_rust_type()
-      .and_then(|op| op.ok_or(CDRSError::from("Value is null or non-set")))
-  }
+    fn as_r_type(&self) -> CDRSResult<T> {
+        self.as_rust_type()
+            .and_then(|op| op.ok_or(CDRSError::from("Value is null or non-set")))
+    }
 }
 
 pub trait AsRust {
-  fn as_rust<R>(&self) -> CDRSResult<Option<R>>
-  where
-    Self: AsRustType<R>,
-  {
-    self.as_rust_type()
-  }
-
-  fn as_r_rust<T>(&self) -> CDRSResult<T>
-  where
-    Self: AsRustType<T>,
-  {
-    self
-      .as_rust()
-      .and_then(|op| op.ok_or("Value is null or non-set".into()))
-  }
+    fn as_rust<R>(&self) -> CDRSResult<Option<R>>
+    where
+        Self: AsRustType<R>,
+    {
+        self.as_rust_type()
+    }
+
+    fn as_r_rust<T>(&self) -> CDRSResult<T>
+    where
+        Self: AsRustType<T>,
+    {
+        self.as_rust()
+            .and_then(|op| op.ok_or("Value is null or non-set".into()))
+    }
 }
 
 /// Should be used to return a single column as Rust value by its name.
 pub trait IntoRustByName<R> {
-  fn get_by_name(&self, name: &str) -> CDRSResult<Option<R>>;
+    fn get_by_name(&self, name: &str) -> CDRSResult<Option<R>>;
 
-  fn get_r_by_name(&self, name: &str) -> CDRSResult<R> {
-    self
-      .get_by_name(name)
-      .and_then(|op| op.ok_or(column_is_empty_err(name)))
-  }
+    fn get_r_by_name(&self, name: &str) -> CDRSResult<R> {
+        self.get_by_name(name)
+            .and_then(|op| op.ok_or(column_is_empty_err(name)))
+    }
 }
 
 pub trait ByName {
-  fn by_name<R>(&self, name: &str) -> CDRSResult<Option<R>>
-  where
-    Self: IntoRustByName<R>,
-  {
-    self.get_by_name(name)
-  }
-
-  fn r_by_name<R>(&self, name: &str) -> CDRSResult<R>
-  where
-    Self: IntoRustByName<R>,
-  {
-    self
-      .by_name(name)
-      .and_then(|op| op.ok_or(column_is_empty_err(name)))
-  }
+    fn by_name<R>(&self, name: &str) -> CDRSResult<Option<R>>
+    where
+        Self: IntoRustByName<R>,
+    {
+        self.get_by_name(name)
+    }
+
+    fn r_by_name<R>(&self, name: &str) -> CDRSResult<R>
+    where
+        Self: IntoRustByName<R>,
+    {
+        self.by_name(name)
+            .and_then(|op| op.ok_or(column_is_empty_err(name)))
+    }
 }
 
 /// Should be used to return a single column as Rust value by its name.
 pub trait IntoRustByIndex<R> {
-  fn get_by_index(&self, index: usize) -> CDRSResult<Option<R>>;
+    fn get_by_index(&self, index: usize) -> CDRSResult<Option<R>>;
 
-  fn get_r_by_index(&self, index: usize) -> CDRSResult<R> {
-    self
-      .get_by_index(index)
-      .and_then(|op| op.ok_or(column_is_empty_err(index)))
-  }
+    fn get_r_by_index(&self, index: usize) -> CDRSResult<R> {
+        self.get_by_index(index)
+            .and_then(|op| op.ok_or(column_is_empty_err(index)))
+    }
 }
 
 pub trait ByIndex {
-  fn by_index<R>(&self, index: usize) -> CDRSResult<Option<R>>
-  where
-    Self: IntoRustByIndex<R>,
-  {
-    self.get_by_index(index)
-  }
-
-  fn r_by_index<R>(&self, index: usize) -> CDRSResult<R>
-  where
-    Self: IntoRustByIndex<R>,
-  {
-    self
-      .by_index(index)
-      .and_then(|op| op.ok_or(column_is_empty_err(index)))
-  }
+    fn by_index<R>(&self, index: usize) -> CDRSResult<Option<R>>
+    where
+        Self: IntoRustByIndex<R>,
+    {
+        self.get_by_index(index)
+    }
+
+    fn r_by_index<R>(&self, index: usize) -> CDRSResult<R>
+    where
+        Self: IntoRustByIndex<R>,
+    {
+        self.by_index(index)
+            .and_then(|op| op.ok_or(column_is_empty_err(index)))
+    }
 }
 
 /// Tries to converts u64 numerical value into array of n bytes.
 pub fn try_to_n_bytes(int: u64, n: usize) -> io::Result<Vec<u8>> {
-  let mut bytes = vec![];
-  bytes.write_uint::<BigEndian>(int, n)?;
+    let mut bytes = vec![];
+    bytes.write_uint::<BigEndian>(int, n)?;
 
-  Ok(bytes)
+    Ok(bytes)
 }
 
 /// Converts u64 numerical value into array of n bytes
@@ -140,17 +134,17 @@ pub fn try_to_n_bytes(int: u64, n: usize) -> io::Result<Vec<u8>> {
 ///
 /// It panics if given unisigned integer could not be converted in an array of n bytes
 pub fn to_n_bytes(int: u64, n: usize) -> Vec<u8> {
-  try_to_n_bytes(int, n).unwrap()
+    try_to_n_bytes(int, n).unwrap()
 }
 
 pub fn try_i_to_n_bytes(int: i64, n: usize) -> io::Result<Vec<u8>> {
-  let mut bytes = Vec::with_capacity(n);
-  unsafe {
-    bytes.set_len(n);
-  }
-  BigEndian::write_int(&mut bytes, int, n);
+    let mut bytes = Vec::with_capacity(n);
+    unsafe {
+        bytes.set_len(n);
+    }
+    BigEndian::write_int(&mut bytes, int, n);
 
-  Ok(bytes)
+    Ok(bytes)
 }
 
 /// Converts u64 numerical value into array of n bytes
@@ -159,51 +153,51 @@ pub fn try_i_to_n_bytes(int: i64, n: usize) -> io::Result<Vec<u8>> {
 ///
 /// It panics if given integer could not be converted in an array of n bytes
 pub fn i_to_n_bytes(int: i64, n: usize) -> Vec<u8> {
-  try_i_to_n_bytes(int, n).unwrap()
+    try_i_to_n_bytes(int, n).unwrap()
 }
 
 /// Tryies to decode bytes array into `u64`.
 pub fn try_from_bytes(bytes: &[u8]) -> Result<u64, io::Error> {
-  let l = bytes.len();
-  let mut c = Cursor::new(bytes);
-  c.read_uint::<BigEndian>(l)
+    let l = bytes.len();
+    let mut c = Cursor::new(bytes);
+    c.read_uint::<BigEndian>(l)
 }
 
 /// Tryies to decode bytes array into `u16`.
 pub fn try_u16_from_bytes(bytes: &[u8]) -> Result<u16, io::Error> {
-  let mut c = Cursor::new(bytes);
-  c.read_u16::<BigEndian>()
+    let mut c = Cursor::new(bytes);
+    c.read_u16::<BigEndian>()
 }
 
 /// Tries to decode bytes array into `i64`.
 pub fn try_i_from_bytes(bytes: &[u8]) -> Result<i64, io::Error> {
-  let l = bytes.len();
-  let mut c = Cursor::new(bytes);
-  c.read_int::<BigEndian>(l)
+    let l = bytes.len();
+    let mut c = Cursor::new(bytes);
+    c.read_int::<BigEndian>(l)
 }
 
 /// Tries to decode bytes array into `i32`.
 pub fn try_i32_from_bytes(bytes: &[u8]) -> Result<i32, io::Error> {
-  let mut c = Cursor::new(bytes);
-  c.read_i32::<BigEndian>()
+    let mut c = Cursor::new(bytes);
+    c.read_i32::<BigEndian>()
 }
 
 /// Tries to decode bytes array into `i16`.
 pub fn try_i16_from_bytes(bytes: &[u8]) -> Result<i16, io::Error> {
-  let mut c = Cursor::new(bytes);
-  c.read_i16::<BigEndian>()
+    let mut c = Cursor::new(bytes);
+    c.read_i16::<BigEndian>()
 }
 
 /// Tries to decode bytes array into `f32`.
 pub fn try_f32_from_bytes(bytes: &[u8]) -> Result<f32, io::Error> {
-  let mut c = Cursor::new(bytes);
-  c.read_f32::<BigEndian>()
+    let mut c = Cursor::new(bytes);
+    c.read_f32::<BigEndian>()
 }
 
 /// Tries to decode bytes array into `f64`.
 pub fn try_f64_from_bytes(bytes: &[u8]) -> Result<f64, io::Error> {
-  let mut c = Cursor::new(bytes);
-  c.read_f64::<BigEndian>()
+    let mut c = Cursor::new(bytes);
+    c.read_f64::<BigEndian>()
 }
 
 /// Converts byte-array into u64
@@ -212,7 +206,7 @@ pub fn try_f64_from_bytes(bytes: &[u8]) -> Result<f64, io::Error> {
 ///
 /// It panics if given bytes could not be converted into `u64`
 pub fn from_bytes(bytes: &[u8]) -> u64 {
-  try_from_bytes(bytes).unwrap()
+    try_from_bytes(bytes).unwrap()
 }
 
 /// Converts byte-array into i64
@@ -221,7 +215,7 @@ pub fn from_bytes(bytes: &[u8]) -> u64 {
 ///
 /// It panics if given bytes could not be converted into `i64`
 pub fn from_i_bytes(bytes: &[u8]) -> i64 {
-  try_i_from_bytes(bytes).unwrap()
+    try_i_from_bytes(bytes).unwrap()
 }
 
 /// Converts byte-array into u16
@@ -230,7 +224,7 @@ pub fn from_i_bytes(bytes: &[u8]) -> i64 {
 ///
 /// It panics if given bytes could not be converted into `u16`
 pub fn from_u16_bytes(bytes: &[u8]) -> u16 {
-  try_u16_from_bytes(bytes).unwrap()
+    try_u16_from_bytes(bytes).unwrap()
 }
 
 /// Converts number i16 into Cassandra's [short].
@@ -239,11 +233,11 @@ pub fn from_u16_bytes(bytes: &[u8]) -> u16 {
 ///
 /// It panics if given `i16` could not be converted into bytes
 pub fn to_short(int: i16) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is i16
-  let _ = bytes.write_i16::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is i16
+    let _ = bytes.write_i16::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Convers integer into Cassandra's [int]
@@ -252,11 +246,11 @@ pub fn to_short(int: i16) -> Vec<u8> {
 ///
 /// It panics if given `i32` could not be converted into bytes
 pub fn to_int(int: i32) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is i16
-  let _ = bytes.write_i32::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is i16
+    let _ = bytes.write_i32::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Convers integer into Cassandra's [int]
@@ -265,45 +259,45 @@ pub fn to_int(int: i32) -> Vec<u8> {
 ///
 /// It panics if given `i64` could not be converted into bytes
 pub fn to_bigint(int: i64) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is i64
-  let _ = bytes.write_i64::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is i64
+    let _ = bytes.write_i64::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Converts integer into Cassandra's [varint].
 pub fn to_varint(int: i64) -> Vec<u8> {
-  if int == 0 {
-    return vec![0];
-  }
-
-  let mut int_bytes = to_bigint(int);
-  match int.signum() {
-    1 => {
-      int_bytes = int_bytes.into_iter().skip_while(|b| *b == 0x00).collect();
-      if int_bytes
-        .get(0)
-        .map(|b| b.leading_zeros() == 0)
-        .unwrap_or(true)
-      {
-        int_bytes.insert(0, 0x00);
-      }
-    }
-    -1 => {
-      int_bytes = int_bytes.into_iter().skip_while(|b| *b == 0xFF).collect();
-      if int_bytes
-        .get(0)
-        .map(|b| b.leading_zeros() > 0)
-        .unwrap_or(true)
-      {
-        int_bytes.insert(0, 0xFF);
-      }
-    }
-    _ => unreachable!(),
-  }
-
-  int_bytes
+    if int == 0 {
+        return vec![0];
+    }
+
+    let mut int_bytes = to_bigint(int);
+    match int.signum() {
+        1 => {
+            int_bytes = int_bytes.into_iter().skip_while(|b| *b == 0x00).collect();
+            if int_bytes
+                .get(0)
+                .map(|b| b.leading_zeros() == 0)
+                .unwrap_or(true)
+            {
+                int_bytes.insert(0, 0x00);
+            }
+        }
+        -1 => {
+            int_bytes = int_bytes.into_iter().skip_while(|b| *b == 0xFF).collect();
+            if int_bytes
+                .get(0)
+                .map(|b| b.leading_zeros() > 0)
+                .unwrap_or(true)
+            {
+                int_bytes.insert(0, 0xFF);
+            }
+        }
+        _ => unreachable!(),
+    }
+
+    int_bytes
 }
 
 /// Converts number i16 into Cassandra's `short`.
@@ -312,11 +306,11 @@ pub fn to_varint(int: i64) -> Vec<u8> {
 ///
 /// It panics if given `u16` could not be converted into bytes
 pub fn to_u_short(int: u16) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is i16
-  let _ = bytes.write_u16::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is i16
+    let _ = bytes.write_u16::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Convers integer into Cassandra's [int]
@@ -325,11 +319,11 @@ pub fn to_u_short(int: u16) -> Vec<u8> {
 ///
 /// It panics if given `u32` could not be converted into bytes
 pub fn to_u(int: u32) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is u64
-  let _ = bytes.write_u32::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is u64
+    let _ = bytes.write_u32::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Convers integer into Cassandra's `int`
@@ -338,11 +332,11 @@ pub fn to_u(int: u32) -> Vec<u8> {
 ///
 /// It panics if given `u64` could not be converted into `u64`
 pub fn to_u_big(int: u64) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is u64
-  let _ = bytes.write_u64::<BigEndian>(int).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is u64
+    let _ = bytes.write_u64::<BigEndian>(int).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Converts `f32` into bytes
@@ -351,11 +345,11 @@ pub fn to_u_big(int: u64) -> Vec<u8> {
 ///
 /// It panics if given `f32` could not be converted into bytes
 pub fn to_float(f: f32) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is f32
-  let _ = bytes.write_f32::<BigEndian>(f).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is f32
+    let _ = bytes.write_f32::<BigEndian>(f).unwrap();
 
-  bytes
+    bytes
 }
 
 /// Converts `f64` into array of bytes
@@ -364,158 +358,157 @@ pub fn to_float(f: f32) -> Vec<u8> {
 ///
 /// It panics if given `f63` could not be converted into bytes
 pub fn to_float_big(f: f64) -> Vec<u8> {
-  let mut bytes = vec![];
-  // should not panic as input is f64
-  let _ = bytes.write_f64::<BigEndian>(f).unwrap();
+    let mut bytes = vec![];
+    // should not panic as input is f64
+    let _ = bytes.write_f64::<BigEndian>(f).unwrap();
 
-  bytes
+    bytes
 }
 
 #[derive(Debug, Clone)]
 pub struct CString {
-  string: String,
+    string: String,
 }
 
 impl CString {
-  pub fn new(string: String) -> CString {
-    CString { string: string }
-  }
+    pub fn new(string: String) -> CString {
+        CString { string: string }
+    }
 
-  /// Converts internal value into pointer of `str`.
-  pub fn as_str<'a>(&'a self) -> &'a str {
-    self.string.as_str()
-  }
+    /// Converts internal value into pointer of `str`.
+    pub fn as_str<'a>(&'a self) -> &'a str {
+        self.string.as_str()
+    }
 
-  /// Converts internal value into a plain `String`.
-  pub fn into_plain(self) -> String {
-    self.string
-  }
+    /// Converts internal value into a plain `String`.
+    pub fn into_plain(self) -> String {
+        self.string
+    }
 
-  /// Represents internal value as a `String`.
-  pub fn as_plain(&self) -> String {
-    self.string.clone()
-  }
+    /// Represents internal value as a `String`.
+    pub fn as_plain(&self) -> String {
+        self.string.clone()
+    }
 }
 
 // Implementation for Rust std types
 // Use extended Rust string as Cassandra [string]
 impl IntoBytes for CString {
-  /// Converts into Cassandra byte representation of [string]
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v: Vec<u8> = vec![];
-    let l = self.string.len() as i16;
-    v.extend_from_slice(to_short(l).as_slice());
-    v.extend_from_slice(self.string.as_bytes());
-    v
-  }
+    /// Converts into Cassandra byte representation of [string]
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v: Vec<u8> = vec![];
+        let l = self.string.len() as i16;
+        v.extend_from_slice(to_short(l).as_slice());
+        v.extend_from_slice(self.string.as_bytes());
+        v
+    }
 }
 
 impl FromCursor for CString {
-  /// from_cursor gets Cursor who's position is set such that it should be a start of a [string].
-  /// It reads required number of bytes and returns a String
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CString> {
-    let len_bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
-    let len: u64 = try_from_bytes(len_bytes.as_slice())?;
-    let body_bytes = cursor_next_value(&mut cursor, len)?;
-
-    String::from_utf8(body_bytes)
-      .map_err(Into::into)
-      .map(CString::new)
-  }
+    /// from_cursor gets Cursor who's position is set such that it should be a start of a [string].
+    /// It reads required number of bytes and returns a String
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CString> {
+        let len_bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
+        let len: u64 = try_from_bytes(len_bytes.as_slice())?;
+        let body_bytes = cursor_next_value(&mut cursor, len)?;
+
+        String::from_utf8(body_bytes)
+            .map_err(Into::into)
+            .map(CString::new)
+    }
 }
 
 #[derive(Debug, Clone)]
 pub struct CStringLong {
-  string: String,
+    string: String,
 }
 
 impl CStringLong {
-  pub fn new(string: String) -> CStringLong {
-    CStringLong { string: string }
-  }
+    pub fn new(string: String) -> CStringLong {
+        CStringLong { string: string }
+    }
 
-  /// Converts internal value into pointer of `str`.
-  pub fn as_str<'a>(&'a self) -> &'a str {
-    self.string.as_str()
-  }
+    /// Converts internal value into pointer of `str`.
+    pub fn as_str<'a>(&'a self) -> &'a str {
+        self.string.as_str()
+    }
 
-  /// Converts internal value into a plain `String`.
-  pub fn into_plain(self) -> String {
-    self.string
-  }
+    /// Converts internal value into a plain `String`.
+    pub fn into_plain(self) -> String {
+        self.string
+    }
 }
 
 // Implementation for Rust std types
 // Use extended Rust string as Cassandra [string]
 impl IntoBytes for CStringLong {
-  /// Converts into Cassandra byte representation of [string]
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v: Vec<u8> = vec![];
-    let l = self.string.len() as i32;
-    v.extend_from_slice(to_int(l).as_slice());
-    v.extend_from_slice(self.string.as_bytes());
-    v
-  }
+    /// Converts into Cassandra byte representation of [string]
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v: Vec<u8> = vec![];
+        let l = self.string.len() as i32;
+        v.extend_from_slice(to_int(l).as_slice());
+        v.extend_from_slice(self.string.as_bytes());
+        v
+    }
 }
 
 impl FromCursor for CStringLong {
-  /// from_cursor gets Cursor who's position is set such that it should be a start of a [string].
-  /// It reads required number of bytes and returns a String
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CStringLong> {
-    let len_bytes = cursor_next_value(&mut cursor, INT_LEN as u64)?;
-    let len: u64 = try_from_bytes(len_bytes.as_slice())?;
-    let body_bytes = cursor_next_value(&mut cursor, len)?;
-
-    String::from_utf8(body_bytes)
-      .map_err(Into::into)
-      .map(CStringLong::new)
-  }
+    /// from_cursor gets Cursor who's position is set such that it should be a start of a [string].
+    /// It reads required number of bytes and returns a String
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CStringLong> {
+        let len_bytes = cursor_next_value(&mut cursor, INT_LEN as u64)?;
+        let len: u64 = try_from_bytes(len_bytes.as_slice())?;
+        let body_bytes = cursor_next_value(&mut cursor, len)?;
+
+        String::from_utf8(body_bytes)
+            .map_err(Into::into)
+            .map(CStringLong::new)
+    }
 }
 
 #[derive(Debug, Clone)]
 pub struct CStringList {
-  pub list: Vec<CString>,
+    pub list: Vec<CString>,
 }
 
 impl CStringList {
-  pub fn into_plain(self) -> Vec<String> {
-    self
-      .list
-      .iter()
-      .map(|string| string.clone().into_plain())
-      .collect()
-  }
+    pub fn into_plain(self) -> Vec<String> {
+        self.list
+            .iter()
+            .map(|string| string.clone().into_plain())
+            .collect()
+    }
 }
 
 impl IntoBytes for CStringList {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut bytes = vec![];
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut bytes = vec![];
 
-    let l = to_short(self.list.len() as i16);
-    bytes.extend_from_slice(l.as_slice());
+        let l = to_short(self.list.len() as i16);
+        bytes.extend_from_slice(l.as_slice());
 
-    bytes = self.list.iter().fold(bytes, |mut _bytes, cstring| {
-      _bytes.extend_from_slice(cstring.into_cbytes().as_slice());
-      _bytes
-    });
+        bytes = self.list.iter().fold(bytes, |mut _bytes, cstring| {
+            _bytes.extend_from_slice(cstring.into_cbytes().as_slice());
+            _bytes
+        });
 
-    bytes
-  }
+        bytes
+    }
 }
 
 impl FromCursor for CStringList {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CStringList> {
-    // TODO: try to use slice instead
-    let mut len_bytes = [0; SHORT_LEN];
-    cursor.read_exact(&mut len_bytes)?;
-    let len = try_from_bytes(len_bytes.to_vec().as_slice())? as usize;
-    let mut list = Vec::with_capacity(len);
-    for _ in 0..len {
-      list.push(CString::from_cursor(&mut cursor)?);
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CStringList> {
+        // TODO: try to use slice instead
+        let mut len_bytes = [0; SHORT_LEN];
+        cursor.read_exact(&mut len_bytes)?;
+        let len = try_from_bytes(len_bytes.to_vec().as_slice())? as usize;
+        let mut list = Vec::with_capacity(len);
+        for _ in 0..len {
+            list.push(CString::from_cursor(&mut cursor)?);
+        }
+
+        Ok(CStringList { list: list })
     }
-
-    Ok(CStringList { list: list })
-  }
 }
 
 //
@@ -523,385 +516,384 @@ impl FromCursor for CStringList {
 #[derive(Debug, Clone, Hash, PartialEq, Eq)]
 /// The structure that represents Cassandra byte type.
 pub struct CBytes {
-  bytes: Option<Vec<u8>>,
+    bytes: Option<Vec<u8>>,
 }
 
 impl CBytes {
-  pub fn new(bytes: Vec<u8>) -> CBytes {
-    CBytes { bytes: Some(bytes) }
-  }
-
-  /// Creates Cassandra bytes that represent empty or null value
-  pub fn new_empty() -> CBytes {
-    CBytes { bytes: None }
-  }
-
-  /// Converts `CBytes` into a plain array of bytes
-  pub fn into_plain(self) -> Option<Vec<u8>> {
-    self.bytes
-  }
-
-  // TODO: try to replace usage of `as_plain` by `as_slice`
-  pub fn as_plain(&self) -> Option<Vec<u8>> {
-    self.bytes.clone()
-  }
-  pub fn as_slice(&self) -> Option<&[u8]> {
-    match self.bytes {
-      Some(ref v) => Some(v.as_slice()),
-      None => None,
-    }
-    // self.bytes.map(|v| v.as_slice())
-  }
-  pub fn is_empty(&self) -> bool {
-    self.bytes.is_some()
-  }
+    pub fn new(bytes: Vec<u8>) -> CBytes {
+        CBytes { bytes: Some(bytes) }
+    }
+
+    /// Creates Cassandra bytes that represent empty or null value
+    pub fn new_empty() -> CBytes {
+        CBytes { bytes: None }
+    }
+
+    /// Converts `CBytes` into a plain array of bytes
+    pub fn into_plain(self) -> Option<Vec<u8>> {
+        self.bytes
+    }
+
+    // TODO: try to replace usage of `as_plain` by `as_slice`
+    pub fn as_plain(&self) -> Option<Vec<u8>> {
+        self.bytes.clone()
+    }
+    pub fn as_slice(&self) -> Option<&[u8]> {
+        match self.bytes {
+            Some(ref v) => Some(v.as_slice()),
+            None => None,
+        }
+        // self.bytes.map(|v| v.as_slice())
+    }
+    pub fn is_empty(&self) -> bool {
+        self.bytes.is_some()
+    }
 }
 
 impl FromCursor for CBytes {
-  /// from_cursor gets Cursor who's position is set such that it should be a start of a [bytes].
-  /// It reads required number of bytes and returns a CBytes
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytes> {
-    let len = CInt::from_cursor(&mut cursor)?;
-    // null or not set value
-    if len < 0 {
-      return Ok(CBytes { bytes: None });
+    /// from_cursor gets Cursor who's position is set such that it should be a start of a [bytes].
+    /// It reads required number of bytes and returns a CBytes
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytes> {
+        let len = CInt::from_cursor(&mut cursor)?;
+        // null or not set value
+        if len < 0 {
+            return Ok(CBytes { bytes: None });
+        }
+
+        cursor_next_value(&mut cursor, len as u64).map(CBytes::new)
     }
-
-    cursor_next_value(&mut cursor, len as u64).map(CBytes::new)
-  }
 }
 
 // Use extended Rust Vec<u8> as Cassandra [bytes]
 impl IntoBytes for CBytes {
-  fn into_cbytes(&self) -> Vec<u8> {
-    match self.bytes {
-      Some(ref b) => {
-        let mut v: Vec<u8> = vec![];
-        let l = b.len() as i32;
-        v.extend_from_slice(to_int(l).as_slice());
-        v.extend_from_slice(b.as_slice());
-        v
-      }
-      None => vec![],
+    fn into_cbytes(&self) -> Vec<u8> {
+        match self.bytes {
+            Some(ref b) => {
+                let mut v: Vec<u8> = vec![];
+                let l = b.len() as i32;
+                v.extend_from_slice(to_int(l).as_slice());
+                v.extend_from_slice(b.as_slice());
+                v
+            }
+            None => vec![],
+        }
     }
-  }
 }
 
 /// Cassandra short bytes
 #[derive(Debug, Clone)]
 pub struct CBytesShort {
-  bytes: Option<Vec<u8>>,
+    bytes: Option<Vec<u8>>,
 }
 
 impl CBytesShort {
-  pub fn new(bytes: Vec<u8>) -> CBytesShort {
-    CBytesShort { bytes: Some(bytes) }
-  }
-  /// Converts `CBytesShort` into plain vector of bytes;
-  pub fn into_plain(self) -> Option<Vec<u8>> {
-    self.bytes
-  }
+    pub fn new(bytes: Vec<u8>) -> CBytesShort {
+        CBytesShort { bytes: Some(bytes) }
+    }
+    /// Converts `CBytesShort` into plain vector of bytes;
+    pub fn into_plain(self) -> Option<Vec<u8>> {
+        self.bytes
+    }
 }
 
 impl FromCursor for CBytesShort {
-  /// from_cursor gets Cursor who's position is set such that it should be a start of a [bytes].
-  /// It reads required number of bytes and returns a CBytes
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytesShort> {
-    let len = CIntShort::from_cursor(&mut cursor)?;
-
-    if len < 0 {
-      return Ok(CBytesShort { bytes: None });
+    /// from_cursor gets Cursor who's position is set such that it should be a start of a [bytes].
+    /// It reads required number of bytes and returns a CBytes
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CBytesShort> {
+        let len = CIntShort::from_cursor(&mut cursor)?;
+
+        if len < 0 {
+            return Ok(CBytesShort { bytes: None });
+        }
+
+        cursor_next_value(&mut cursor, len as u64)
+            .map(CBytesShort::new)
+            .map_err(Into::into)
     }
-
-    cursor_next_value(&mut cursor, len as u64)
-      .map(CBytesShort::new)
-      .map_err(Into::into)
-  }
 }
 
 // Use extended Rust Vec<u8> as Cassandra [bytes]
 impl IntoBytes for CBytesShort {
-  fn into_cbytes(&self) -> Vec<u8> {
-    match self.bytes {
-      Some(ref b) => {
-        let mut v: Vec<u8> = vec![];
-        let l = b.len() as i16;
-        v.extend_from_slice(to_short(l).as_slice());
-        v.extend_from_slice(b.as_slice());
-        v
-      }
-      None => vec![],
+    fn into_cbytes(&self) -> Vec<u8> {
+        match self.bytes {
+            Some(ref b) => {
+                let mut v: Vec<u8> = vec![];
+                let l = b.len() as i16;
+                v.extend_from_slice(to_short(l).as_slice());
+                v.extend_from_slice(b.as_slice());
+                v
+            }
+            None => vec![],
+        }
     }
-  }
 }
 
 /// Cassandra int type.
 pub type CInt = i32;
 
 impl FromCursor for CInt {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CInt> {
-    let bytes = cursor_next_value(&mut cursor, INT_LEN as u64)?;
-    try_i32_from_bytes(bytes.as_slice()).map_err(Into::into)
-  }
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CInt> {
+        let bytes = cursor_next_value(&mut cursor, INT_LEN as u64)?;
+        try_i32_from_bytes(bytes.as_slice()).map_err(Into::into)
+    }
 }
 
 /// Cassandra int short type.
 pub type CIntShort = i16;
 
 impl FromCursor for CIntShort {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CIntShort> {
-    let bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
-    try_i16_from_bytes(bytes.as_slice()).map_err(Into::into)
-  }
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CIntShort> {
+        let bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
+        try_i16_from_bytes(bytes.as_slice()).map_err(Into::into)
+    }
 }
 
 // Use extended Rust Vec<u8> as Cassandra [bytes]
 impl FromBytes for Vec<u8> {
-  fn from_bytes(bytes: &[u8]) -> CDRSResult<Vec<u8>> {
-    let mut cursor = Cursor::new(bytes);
-    let len_bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
-    let len: u64 = try_from_bytes(len_bytes.as_slice())?;
+    fn from_bytes(bytes: &[u8]) -> CDRSResult<Vec<u8>> {
+        let mut cursor = Cursor::new(bytes);
+        let len_bytes = cursor_next_value(&mut cursor, SHORT_LEN as u64)?;
+        let len: u64 = try_from_bytes(len_bytes.as_slice())?;
 
-    cursor_next_value(&mut cursor, len).map_err(Into::into)
-  }
+        cursor_next_value(&mut cursor, len).map_err(Into::into)
+    }
 }
 
 /// The structure wich represets Cassandra [inet]
 /// (https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec#L222).
 #[derive(Debug)]
 pub struct CInet {
-  pub addr: SocketAddr,
+    pub addr: SocketAddr,
 }
 
 impl FromCursor for CInet {
-  fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CInet> {
-    let n = CIntShort::from_cursor(&mut cursor)?;
-    let ip = decode_inet(cursor_next_value(&mut cursor, n as u64)?.as_slice())?;
-    let port = CInt::from_cursor(&mut cursor)?;
-    let socket_addr = SocketAddr::new(ip, port as u16);
+    fn from_cursor(mut cursor: &mut Cursor<&[u8]>) -> CDRSResult<CInet> {
+        let n = CIntShort::from_cursor(&mut cursor)?;
+        let ip = decode_inet(cursor_next_value(&mut cursor, n as u64)?.as_slice())?;
+        let port = CInt::from_cursor(&mut cursor)?;
+        let socket_addr = SocketAddr::new(ip, port as u16);
 
-    Ok(CInet { addr: socket_addr })
-  }
+        Ok(CInet { addr: socket_addr })
+    }
 }
 
 pub fn cursor_next_value(cursor: &mut Cursor<&[u8]>, len: u64) -> CDRSResult<Vec<u8>> {
-  let l = len as usize;
-  let current_position = cursor.position();
-  let mut buff: Vec<u8> = Vec::with_capacity(l);
-  unsafe {
-    buff.set_len(l);
-  }
-  cursor.read_exact(&mut buff)?;
-  cursor.set_position(current_position + len);
-  Ok(buff)
+    let l = len as usize;
+    let current_position = cursor.position();
+    let mut buff: Vec<u8> = Vec::with_capacity(l);
+    unsafe {
+        buff.set_len(l);
+    }
+    cursor.read_exact(&mut buff)?;
+    cursor.set_position(current_position + len);
+    Ok(buff)
 }
 
 #[cfg(test)]
 mod tests {
-  use super::*;
-  use crate::frame::traits::{FromCursor, IntoBytes};
-  use std::io::Cursor;
-  use std::mem::transmute;
-
-  // CString
-  #[test]
-  fn test_cstring_new() {
-    let foo = "foo".to_string();
-    let _ = CString::new(foo);
-  }
-
-  #[test]
-  fn test_cstring_as_str() {
-    let foo = "foo".to_string();
-    let cstring = CString::new(foo);
-
-    assert_eq!(cstring.as_str(), "foo");
-  }
-
-  #[test]
-  fn test_cstring_into_plain() {
-    let foo = "foo".to_string();
-    let cstring = CString::new(foo);
-
-    assert_eq!(cstring.into_plain(), "foo".to_string());
-  }
-
-  #[test]
-  fn test_cstring_into_cbytes() {
-    let foo = "foo".to_string();
-    let cstring = CString::new(foo);
-
-    assert_eq!(cstring.into_cbytes(), &[0, 3, 102, 111, 111]);
-  }
-
-  #[test]
-  fn test_cstring_from_cursor() {
-    let a = &[0, 3, 102, 111, 111, 0];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let cstring = CString::from_cursor(&mut cursor).unwrap();
-    assert_eq!(cstring.as_str(), "foo");
-  }
-
-  // CStringLong
-  #[test]
-  fn test_cstringlong_new() {
-    let foo = "foo".to_string();
-    let _ = CStringLong::new(foo);
-  }
-
-  #[test]
-  fn test_cstringlong_as_str() {
-    let foo = "foo".to_string();
-    let cstring = CStringLong::new(foo);
-
-    assert_eq!(cstring.as_str(), "foo");
-  }
-
-  #[test]
-  fn test_cstringlong_into_plain() {
-    let foo = "foo".to_string();
-    let cstring = CStringLong::new(foo);
-
-    assert_eq!(cstring.into_plain(), "foo".to_string());
-  }
-
-  #[test]
-  fn test_cstringlong_into_cbytes() {
-    let foo = "foo".to_string();
-    let cstring = CStringLong::new(foo);
-
-    assert_eq!(cstring.into_cbytes(), &[0, 0, 0, 3, 102, 111, 111]);
-  }
-
-  #[test]
-  fn test_cstringlong_from_cursor() {
-    let a = &[0, 0, 0, 3, 102, 111, 111, 0];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let cstring = CStringLong::from_cursor(&mut cursor).unwrap();
-    assert_eq!(cstring.as_str(), "foo");
-  }
-
-  // CStringList
-  #[test]
-  fn test_cstringlist() {
-    let a = &[0, 2, 0, 3, 102, 111, 111, 0, 3, 102, 111, 111];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let list = CStringList::from_cursor(&mut cursor).unwrap();
-    let plain = list.into_plain();
-    assert_eq!(plain.len(), 2);
-    for s in plain.iter() {
-      assert_eq!(s.as_str(), "foo");
-    }
-  }
-
-  // CBytes
-  #[test]
-  fn test_cbytes_new() {
-    let bytes_vec = vec![1, 2, 3];
-    let _ = CBytes::new(bytes_vec);
-  }
-
-  #[test]
-  fn test_cbytes_into_plain() {
-    let cbytes = CBytes::new(vec![1, 2, 3]);
-    assert_eq!(cbytes.into_plain().unwrap(), &[1, 2, 3]);
-  }
-
-  #[test]
-  fn test_cbytes_from_cursor() {
-    let a = &[0, 0, 0, 3, 1, 2, 3];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let cbytes = CBytes::from_cursor(&mut cursor).unwrap();
-    assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
-  }
-
-  #[test]
-  fn test_cbytes_into_cbytes() {
-    let bytes_vec = vec![1, 2, 3];
-    let cbytes = CBytes::new(bytes_vec);
-    assert_eq!(cbytes.into_cbytes(), vec![0, 0, 0, 3, 1, 2, 3]);
-  }
-
-  // CBytesShort
-  #[test]
-  fn test_cbytesshort_new() {
-    let bytes_vec = vec![1, 2, 3];
-    let _ = CBytesShort::new(bytes_vec);
-  }
-
-  #[test]
-  fn test_cbytesshort_into_plain() {
-    let cbytes = CBytesShort::new(vec![1, 2, 3]);
-    assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
-  }
-
-  #[test]
-  fn test_cbytesshort_from_cursor() {
-    let a = &[0, 3, 1, 2, 3];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let cbytes = CBytesShort::from_cursor(&mut cursor).unwrap();
-    assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
-  }
-
-  #[test]
-  fn test_cbytesshort_into_cbytes() {
-    let bytes_vec: Vec<u8> = vec![1, 2, 3];
-    let cbytes = CBytesShort::new(bytes_vec);
-    assert_eq!(cbytes.into_cbytes(), vec![0, 3, 1, 2, 3]);
-  }
-
-  // CInt
-  #[test]
-  fn test_cint_from_cursor() {
-    let a = &[0, 0, 0, 5];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let i = CInt::from_cursor(&mut cursor).unwrap();
-    assert_eq!(i, 5);
-  }
-
-  // CIntShort
-  #[test]
-  fn test_cintshort_from_cursor() {
-    let a = &[0, 5];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let i = CIntShort::from_cursor(&mut cursor).unwrap();
-    assert_eq!(i, 5);
-  }
-
-  // cursor_next_value
-  #[test]
-  fn test_cursor_next_value() {
-    let a = &[0, 1, 2, 3, 4];
-    let mut cursor: Cursor<&[u8]> = Cursor::new(a);
-    let l: u64 = 3;
-    let val = cursor_next_value(&mut cursor, l).unwrap();
-    assert_eq!(val, vec![0, 1, 2]);
-  }
-
-  #[test]
-  fn test_try_u16_from_bytes() {
-    let bytes: [u8; 2] = unsafe { transmute(12u16.to_be()) }; // or .to_le()
-    let val = try_u16_from_bytes(&bytes);
-    assert_eq!(val.unwrap(), 12u16);
-  }
-
-  #[test]
-  fn test_from_i_bytes() {
-    let bytes: [u8; 8] = unsafe { transmute(12i64.to_be()) }; // or .to_le()
-    let val = from_i_bytes(&bytes);
-    assert_eq!(val, 12i64);
-  }
-
-  #[test]
-  fn test_to_varint() {
-    assert_eq!(to_varint(0), vec![0x00]);
-    assert_eq!(to_varint(1), vec![0x01]);
-    assert_eq!(to_varint(127), vec![0x7F]);
-    assert_eq!(to_varint(128), vec![0x00, 0x80]);
-    assert_eq!(to_varint(129), vec![0x00, 0x81]);
-    assert_eq!(to_varint(-1), vec![0xFF]);
-    assert_eq!(to_varint(-128), vec![0x80]);
-    assert_eq!(to_varint(-129), vec![0xFF, 0x7F]);
-  }
+    use super::*;
+    use crate::frame::traits::{FromCursor, IntoBytes};
+    use std::io::Cursor;
+    use std::mem::transmute;
+
+    // CString
+    #[test]
+    fn test_cstring_new() {
+        let foo = "foo".to_string();
+        let _ = CString::new(foo);
+    }
+
+    #[test]
+    fn test_cstring_as_str() {
+        let foo = "foo".to_string();
+        let cstring = CString::new(foo);
+
+        assert_eq!(cstring.as_str(), "foo");
+    }
+
+    #[test]
+    fn test_cstring_into_plain() {
+        let foo = "foo".to_string();
+        let cstring = CString::new(foo);
+
+        assert_eq!(cstring.into_plain(), "foo".to_string());
+    }
+
+    #[test]
+    fn test_cstring_into_cbytes() {
+        let foo = "foo".to_string();
+        let cstring = CString::new(foo);
+
+        assert_eq!(cstring.into_cbytes(), &[0, 3, 102, 111, 111]);
+    }
+
+    #[test]
+    fn test_cstring_from_cursor() {
+        let a = &[0, 3, 102, 111, 111, 0];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let cstring = CString::from_cursor(&mut cursor).unwrap();
+        assert_eq!(cstring.as_str(), "foo");
+    }
+
+    // CStringLong
+    #[test]
+    fn test_cstringlong_new() {
+        let foo = "foo".to_string();
+        let _ = CStringLong::new(foo);
+    }
+
+    #[test]
+    fn test_cstringlong_as_str() {
+        let foo = "foo".to_string();
+        let cstring = CStringLong::new(foo);
+
+        assert_eq!(cstring.as_str(), "foo");
+    }
+
+    #[test]
+    fn test_cstringlong_into_plain() {
+        let foo = "foo".to_string();
+        let cstring = CStringLong::new(foo);
+
+        assert_eq!(cstring.into_plain(), "foo".to_string());
+    }
 
+    #[test]
+    fn test_cstringlong_into_cbytes() {
+        let foo = "foo".to_string();
+        let cstring = CStringLong::new(foo);
+
+        assert_eq!(cstring.into_cbytes(), &[0, 0, 0, 3, 102, 111, 111]);
+    }
+
+    #[test]
+    fn test_cstringlong_from_cursor() {
+        let a = &[0, 0, 0, 3, 102, 111, 111, 0];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let cstring = CStringLong::from_cursor(&mut cursor).unwrap();
+        assert_eq!(cstring.as_str(), "foo");
+    }
+
+    // CStringList
+    #[test]
+    fn test_cstringlist() {
+        let a = &[0, 2, 0, 3, 102, 111, 111, 0, 3, 102, 111, 111];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let list = CStringList::from_cursor(&mut cursor).unwrap();
+        let plain = list.into_plain();
+        assert_eq!(plain.len(), 2);
+        for s in plain.iter() {
+            assert_eq!(s.as_str(), "foo");
+        }
+    }
+
+    // CBytes
+    #[test]
+    fn test_cbytes_new() {
+        let bytes_vec = vec![1, 2, 3];
+        let _ = CBytes::new(bytes_vec);
+    }
+
+    #[test]
+    fn test_cbytes_into_plain() {
+        let cbytes = CBytes::new(vec![1, 2, 3]);
+        assert_eq!(cbytes.into_plain().unwrap(), &[1, 2, 3]);
+    }
+
+    #[test]
+    fn test_cbytes_from_cursor() {
+        let a = &[0, 0, 0, 3, 1, 2, 3];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let cbytes = CBytes::from_cursor(&mut cursor).unwrap();
+        assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
+    }
+
+    #[test]
+    fn test_cbytes_into_cbytes() {
+        let bytes_vec = vec![1, 2, 3];
+        let cbytes = CBytes::new(bytes_vec);
+        assert_eq!(cbytes.into_cbytes(), vec![0, 0, 0, 3, 1, 2, 3]);
+    }
+
+    // CBytesShort
+    #[test]
+    fn test_cbytesshort_new() {
+        let bytes_vec = vec![1, 2, 3];
+        let _ = CBytesShort::new(bytes_vec);
+    }
+
+    #[test]
+    fn test_cbytesshort_into_plain() {
+        let cbytes = CBytesShort::new(vec![1, 2, 3]);
+        assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
+    }
+
+    #[test]
+    fn test_cbytesshort_from_cursor() {
+        let a = &[0, 3, 1, 2, 3];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let cbytes = CBytesShort::from_cursor(&mut cursor).unwrap();
+        assert_eq!(cbytes.into_plain().unwrap(), vec![1, 2, 3]);
+    }
+
+    #[test]
+    fn test_cbytesshort_into_cbytes() {
+        let bytes_vec: Vec<u8> = vec![1, 2, 3];
+        let cbytes = CBytesShort::new(bytes_vec);
+        assert_eq!(cbytes.into_cbytes(), vec![0, 3, 1, 2, 3]);
+    }
+
+    // CInt
+    #[test]
+    fn test_cint_from_cursor() {
+        let a = &[0, 0, 0, 5];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let i = CInt::from_cursor(&mut cursor).unwrap();
+        assert_eq!(i, 5);
+    }
+
+    // CIntShort
+    #[test]
+    fn test_cintshort_from_cursor() {
+        let a = &[0, 5];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let i = CIntShort::from_cursor(&mut cursor).unwrap();
+        assert_eq!(i, 5);
+    }
+
+    // cursor_next_value
+    #[test]
+    fn test_cursor_next_value() {
+        let a = &[0, 1, 2, 3, 4];
+        let mut cursor: Cursor<&[u8]> = Cursor::new(a);
+        let l: u64 = 3;
+        let val = cursor_next_value(&mut cursor, l).unwrap();
+        assert_eq!(val, vec![0, 1, 2]);
+    }
+
+    #[test]
+    fn test_try_u16_from_bytes() {
+        let bytes: [u8; 2] = unsafe { transmute(12u16.to_be()) }; // or .to_le()
+        let val = try_u16_from_bytes(&bytes);
+        assert_eq!(val.unwrap(), 12u16);
+    }
+
+    #[test]
+    fn test_from_i_bytes() {
+        let bytes: [u8; 8] = unsafe { transmute(12i64.to_be()) }; // or .to_le()
+        let val = from_i_bytes(&bytes);
+        assert_eq!(val, 12i64);
+    }
+
+    #[test]
+    fn test_to_varint() {
+        assert_eq!(to_varint(0), vec![0x00]);
+        assert_eq!(to_varint(1), vec![0x01]);
+        assert_eq!(to_varint(127), vec![0x7F]);
+        assert_eq!(to_varint(128), vec![0x00, 0x80]);
+        assert_eq!(to_varint(129), vec![0x00, 0x81]);
+        assert_eq!(to_varint(-1), vec![0xFF]);
+        assert_eq!(to_varint(-128), vec![0x80]);
+        assert_eq!(to_varint(-129), vec![0xFF, 0x7F]);
+    }
 }
diff --git a/src/types/rows.rs b/src/types/rows.rs
index aba5e85..e3dbec4 100644
--- a/src/types/rows.rs
+++ b/src/types/rows.rs
@@ -4,7 +4,7 @@ use uuid::Uuid;
 
 use crate::error::{column_is_empty_err, Error, Result};
 use crate::frame::frame_result::{
-  BodyResResultRows, ColSpec, ColType, ColTypeOption, ColTypeOptionValue, RowsMetadata,
+    BodyResResultRows, ColSpec, ColType, ColTypeOption, ColTypeOptionValue, RowsMetadata,
 };
 use crate::types::blob::Blob;
 use crate::types::data_serialization_types::*;
@@ -17,40 +17,38 @@ use crate::types::{ByIndex, ByName, CBytes, IntoRustByIndex, IntoRustByName};
 
 #[derive(Clone, Debug)]
 pub struct Row {
-  metadata: RowsMetadata,
-  row_content: Vec<CBytes>,
+    metadata: RowsMetadata,
+    row_content: Vec<CBytes>,
 }
 
 impl Row {
-  pub fn from_frame_body(body: BodyResResultRows) -> Vec<Row> {
-    body
-      .rows_content
-      .iter()
-      .map(|row| Row {
-        metadata: body.metadata.clone(),
-        row_content: row.clone(),
-      })
-      .collect()
-  }
+    pub fn from_frame_body(body: BodyResResultRows) -> Vec<Row> {
+        body.rows_content
+            .iter()
+            .map(|row| Row {
+                metadata: body.metadata.clone(),
+                row_content: row.clone(),
+            })
+            .collect()
+    }
 
-  fn get_col_spec_by_name(&self, name: &str) -> Option<(&ColSpec, &CBytes)> {
-    self
-      .metadata
-      .col_specs
-      .iter()
-      .position(|spec| spec.name.as_str() == name)
-      .map(|i| {
-        let ref col_spec = self.metadata.col_specs[i];
-        let ref data = self.row_content[i];
-        (col_spec, data)
-      })
-  }
+    fn get_col_spec_by_name(&self, name: &str) -> Option<(&ColSpec, &CBytes)> {
+        self.metadata
+            .col_specs
+            .iter()
+            .position(|spec| spec.name.as_str() == name)
+            .map(|i| {
+                let ref col_spec = self.metadata.col_specs[i];
+                let ref data = self.row_content[i];
+                (col_spec, data)
+            })
+    }
 
-  fn get_col_spec_by_index(&self, index: usize) -> Option<(&ColSpec, &CBytes)> {
-    let specs = self.metadata.col_specs.iter();
-    let values = self.row_content.iter();
-    specs.zip(values).nth(index)
-  }
+    fn get_col_spec_by_index(&self, index: usize) -> Option<(&ColSpec, &CBytes)> {
+        let specs = self.metadata.col_specs.iter();
+        let values = self.row_content.iter();
+        specs.zip(values).nth(index)
+    }
 }
 
 impl ByName for Row {}
diff --git a/src/types/tuple.rs b/src/types/tuple.rs
index 800d592..2b0e66c 100644
--- a/src/types/tuple.rs
+++ b/src/types/tuple.rs
@@ -16,46 +16,46 @@ use std::hash::{Hash, Hasher};
 
 #[derive(Debug)]
 pub struct Tuple {
-  data: Vec<(ColTypeOption, CBytes)>,
+    data: Vec<(ColTypeOption, CBytes)>,
 }
 
 impl PartialEq for Tuple {
-  fn eq(&self, other: &Tuple) -> bool {
-    if self.data.len() != other.data.len() {
-      return false;
+    fn eq(&self, other: &Tuple) -> bool {
+        if self.data.len() != other.data.len() {
+            return false;
+        }
+        for (s, o) in self.data.iter().zip(other.data.iter()) {
+            if s.1 != o.1 {
+                return false;
+            }
+        }
+        true
     }
-    for (s, o) in self.data.iter().zip(other.data.iter()) {
-      if s.1 != o.1 {
-        return false;
-      }
-    }
-    true
-  }
 }
 
 impl Eq for Tuple {}
 
 impl Hash for Tuple {
-  fn hash<H: Hasher>(&self, state: &mut H) {
-    for data in &self.data {
-      data.1.hash(state);
+    fn hash<H: Hasher>(&self, state: &mut H) {
+        for data in &self.data {
+            data.1.hash(state);
+        }
     }
-  }
 }
 
 impl Tuple {
-  pub fn new<'a>(data: Vec<CBytes>, metadata: &'a CTuple) -> Tuple {
-    let meta_iter = metadata.types.iter();
+    pub fn new<'a>(data: Vec<CBytes>, metadata: &'a CTuple) -> Tuple {
+        let meta_iter = metadata.types.iter();
 
-    let acc = Vec::with_capacity(metadata.types.len());
-    let d = meta_iter.zip(data.iter()).fold(acc, |mut a, v| {
-      let (val_type, val_b) = v;
-      a.push((val_type.clone(), val_b.clone()));
-      a
-    });
+        let acc = Vec::with_capacity(metadata.types.len());
+        let d = meta_iter.zip(data.iter()).fold(acc, |mut a, v| {
+            let (val_type, val_b) = v;
+            a.push((val_type.clone(), val_b.clone()));
+            a
+        });
 
-    Tuple { data: d }
-  }
+        Tuple { data: d }
+    }
 }
 
 impl ByIndex for Tuple {}
diff --git a/src/types/udt.rs b/src/types/udt.rs
index cdf6b66..8a486d7 100644
--- a/src/types/udt.rs
+++ b/src/types/udt.rs
@@ -15,25 +15,25 @@ use crate::types::{ByName, CBytes, IntoRustByName};
 
 #[derive(Clone, Debug)]
 pub struct UDT {
-  data: HashMap<String, (ColTypeOption, CBytes)>,
+    data: HashMap<String, (ColTypeOption, CBytes)>,
 }
 
 impl UDT {
-  pub fn new<'a>(data: Vec<CBytes>, metadata: &'a CUdt) -> UDT {
-    let meta_iter = metadata.descriptions.iter();
+    pub fn new<'a>(data: Vec<CBytes>, metadata: &'a CUdt) -> UDT {
+        let meta_iter = metadata.descriptions.iter();
 
-    let acc: HashMap<String, (ColTypeOption, CBytes)> =
-      HashMap::with_capacity(metadata.descriptions.len());
-    let d = meta_iter.zip(data.iter()).fold(acc, |mut a, v| {
-      let (m, val_b) = v;
-      let &(ref name_b, ref val_type) = m;
-      let name = name_b.as_plain();
-      a.insert(name, (val_type.clone(), val_b.clone()));
-      a
-    });
+        let acc: HashMap<String, (ColTypeOption, CBytes)> =
+            HashMap::with_capacity(metadata.descriptions.len());
+        let d = meta_iter.zip(data.iter()).fold(acc, |mut a, v| {
+            let (m, val_b) = v;
+            let &(ref name_b, ref val_type) = m;
+            let name = name_b.as_plain();
+            a.insert(name, (val_type.clone(), val_b.clone()));
+            a
+        });
 
-    UDT { data: d }
-  }
+        UDT { data: d }
+    }
 }
 
 impl ByName for UDT {}
diff --git a/src/types/value.rs b/src/types/value.rs
index cb2cbb7..7af5732 100644
--- a/src/types/value.rs
+++ b/src/types/value.rs
@@ -16,310 +16,309 @@ use super::*;
 /// Types of Cassandra value: normal value (bits), null value and not-set value
 #[derive(Debug, Clone)]
 pub enum ValueType {
-  Normal(i32),
-  Null,
-  NotSet,
+    Normal(i32),
+    Null,
+    NotSet,
 }
 
 impl IntoBytes for ValueType {
-  fn into_cbytes(&self) -> Vec<u8> {
-    match *self {
-      ValueType::Normal(n) => to_int(n),
-      ValueType::Null => i_to_n_bytes(-1, INT_LEN),
-      ValueType::NotSet => i_to_n_bytes(-2, INT_LEN),
+    fn into_cbytes(&self) -> Vec<u8> {
+        match *self {
+            ValueType::Normal(n) => to_int(n),
+            ValueType::Null => i_to_n_bytes(-1, INT_LEN),
+            ValueType::NotSet => i_to_n_bytes(-2, INT_LEN),
+        }
     }
-  }
 }
 
 /// Cassandra value which could be an array of bytes, null and non-set values.
 #[derive(Debug, Clone)]
 pub struct Value {
-  pub body: Vec<u8>,
-  pub value_type: ValueType,
+    pub body: Vec<u8>,
+    pub value_type: ValueType,
 }
 
 impl Value {
-  /// The factory method which creates a normal type value basing on provided bytes.
-  pub fn new_normal<B>(v: B) -> Value
-  where
-    B: Into<Bytes>,
-  {
-    let bytes = v.into().0;
-    let l = bytes.len() as i32;
-    Value {
-      body: bytes,
-      value_type: ValueType::Normal(l),
-    }
-  }
-
-  /// The factory method which creates null Cassandra value.
-  pub fn new_null() -> Value {
-    Value {
-      body: vec![],
-      value_type: ValueType::Null,
-    }
-  }
-
-  /// The factory method which creates non-set Cassandra value.
-  pub fn new_not_set() -> Value {
-    Value {
-      body: vec![],
-      value_type: ValueType::NotSet,
-    }
-  }
+    /// The factory method which creates a normal type value basing on provided bytes.
+    pub fn new_normal<B>(v: B) -> Value
+    where
+        B: Into<Bytes>,
+    {
+        let bytes = v.into().0;
+        let l = bytes.len() as i32;
+        Value {
+            body: bytes,
+            value_type: ValueType::Normal(l),
+        }
+    }
+
+    /// The factory method which creates null Cassandra value.
+    pub fn new_null() -> Value {
+        Value {
+            body: vec![],
+            value_type: ValueType::Null,
+        }
+    }
+
+    /// The factory method which creates non-set Cassandra value.
+    pub fn new_not_set() -> Value {
+        Value {
+            body: vec![],
+            value_type: ValueType::NotSet,
+        }
+    }
 }
 
 impl IntoBytes for Value {
-  fn into_cbytes(&self) -> Vec<u8> {
-    let mut v = Vec::with_capacity(INT_LEN + self.body.len());
-    v.extend_from_slice(self.value_type.into_cbytes().as_slice());
-    v.extend_from_slice(self.body.as_slice());
-    v
-  }
+    fn into_cbytes(&self) -> Vec<u8> {
+        let mut v = Vec::with_capacity(INT_LEN + self.body.len());
+        v.extend_from_slice(self.value_type.into_cbytes().as_slice());
+        v.extend_from_slice(self.body.as_slice());
+        v
+    }
 }
 
 impl<T: Into<Bytes>> From<T> for Value {
-  fn from(b: T) -> Value {
-    Value::new_normal(b.into())
-  }
+    fn from(b: T) -> Value {
+        Value::new_normal(b.into())
+    }
 }
 
 impl<T: Into<Bytes>> From<Option<T>> for Value {
-  fn from(b: Option<T>) -> Value {
-    match b {
-      Some(b) => Value::new_normal(b.into()),
-      None => Value::new_null(),
+    fn from(b: Option<T>) -> Value {
+        match b {
+            Some(b) => Value::new_normal(b.into()),
+            None => Value::new_null(),
+        }
     }
-  }
 }
 
 #[derive(Debug, Clone)]
 pub struct Bytes(Vec<u8>);
 
 impl Bytes {
-  pub fn new(bytes: Vec<u8>) -> Bytes {
-    Bytes(bytes)
-  }
+    pub fn new(bytes: Vec<u8>) -> Bytes {
+        Bytes(bytes)
+    }
 }
 
 impl Into<Bytes> for String {
-  fn into(self) -> Bytes {
-    Bytes(self.into_bytes())
-  }
+    fn into(self) -> Bytes {
+        Bytes(self.into_bytes())
+    }
 }
 
 impl<'a> Into<Bytes> for &'a str {
-  fn into(self) -> Bytes {
-    Bytes(self.as_bytes().to_vec())
-  }
+    fn into(self) -> Bytes {
+        Bytes(self.as_bytes().to_vec())
+    }
 }
 
 impl Into<Bytes> for i8 {
-  fn into(self) -> Bytes {
-    Bytes(vec![self as u8])
-  }
+    fn into(self) -> Bytes {
+        Bytes(vec![self as u8])
+    }
 }
 
 impl Into<Bytes> for i16 {
-  fn into(self) -> Bytes {
-    Bytes(to_short(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_short(self))
+    }
 }
 
 impl Into<Bytes> for i32 {
-  fn into(self) -> Bytes {
-    Bytes(to_int(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_int(self))
+    }
 }
 
 impl Into<Bytes> for i64 {
-  fn into(self) -> Bytes {
-    Bytes(to_bigint(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_bigint(self))
+    }
 }
 
 impl Into<Bytes> for u8 {
-  fn into(self) -> Bytes {
-    Bytes(vec![self])
-  }
+    fn into(self) -> Bytes {
+        Bytes(vec![self])
+    }
 }
 
 impl Into<Bytes> for u16 {
-  fn into(self) -> Bytes {
-    Bytes(to_u_short(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_u_short(self))
+    }
 }
 
 impl Into<Bytes> for u32 {
-  fn into(self) -> Bytes {
-    Bytes(to_u(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_u(self))
+    }
 }
 
 impl Into<Bytes> for u64 {
-  fn into(self) -> Bytes {
-    Bytes(to_u_big(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_u_big(self))
+    }
 }
 
 impl Into<Bytes> for bool {
-  fn into(self) -> Bytes {
-    if self {
-      Bytes(vec![1])
-    } else {
-      Bytes(vec![0])
+    fn into(self) -> Bytes {
+        if self {
+            Bytes(vec![1])
+        } else {
+            Bytes(vec![0])
+        }
     }
-  }
 }
 
 impl Into<Bytes> for Uuid {
-  fn into(self) -> Bytes {
-    Bytes(self.as_bytes().to_vec())
-  }
+    fn into(self) -> Bytes {
+        Bytes(self.as_bytes().to_vec())
+    }
 }
 
 impl Into<Bytes> for IpAddr {
-  fn into(self) -> Bytes {
-    match self {
-      IpAddr::V4(ip) => Bytes(ip.octets().to_vec()),
-      IpAddr::V6(ip) => Bytes(ip.octets().to_vec()),
+    fn into(self) -> Bytes {
+        match self {
+            IpAddr::V4(ip) => Bytes(ip.octets().to_vec()),
+            IpAddr::V6(ip) => Bytes(ip.octets().to_vec()),
+        }
     }
-  }
 }
 
 impl Into<Bytes> for f32 {
-  fn into(self) -> Bytes {
-    Bytes(to_float(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_float(self))
+    }
 }
 
 impl Into<Bytes> for f64 {
-  fn into(self) -> Bytes {
-    Bytes(to_float_big(self))
-  }
+    fn into(self) -> Bytes {
+        Bytes(to_float_big(self))
+    }
 }
 
 impl Into<Bytes> for Timespec {
-  fn into(self) -> Bytes {
-    let ts: i64 = self.sec * 1_000 + self.nsec as i64 / 1_000_000;
-    Bytes(to_bigint(ts))
-  }
+    fn into(self) -> Bytes {
+        let ts: i64 = self.sec * 1_000 + self.nsec as i64 / 1_000_000;
+        Bytes(to_bigint(ts))
+    }
 }
 
 impl Into<Bytes> for Blob {
-  fn into(self) -> Bytes {
-    Bytes(self.into_vec())
-  }
+    fn into(self) -> Bytes {
+        Bytes(self.into_vec())
+    }
 }
 
 impl Into<Bytes> for Decimal {
-  fn into(self) -> Bytes {
-    Bytes(self.into_cbytes())
-  }
+    fn into(self) -> Bytes {
+        Bytes(self.into_cbytes())
+    }
 }
 
 impl<T: Into<Bytes> + Clone + Debug> From<Vec<T>> for Bytes {
-  fn from(vec: Vec<T>) -> Bytes {
-    let mut bytes: Vec<u8> = vec![];
-    bytes.extend_from_slice(to_int(vec.len() as i32).as_slice());
-    bytes = vec.iter().fold(bytes, |mut acc, v| {
-      let b: Bytes = v.clone().into();
-      acc.extend_from_slice(Value::new_normal(b).into_cbytes().as_slice());
-      acc
-    });
-    Bytes(bytes)
-  }
+    fn from(vec: Vec<T>) -> Bytes {
+        let mut bytes: Vec<u8> = vec![];
+        bytes.extend_from_slice(to_int(vec.len() as i32).as_slice());
+        bytes = vec.iter().fold(bytes, |mut acc, v| {
+            let b: Bytes = v.clone().into();
+            acc.extend_from_slice(Value::new_normal(b).into_cbytes().as_slice());
+            acc
+        });
+        Bytes(bytes)
+    }
 }
 
 impl<K, V> From<HashMap<K, V>> for Bytes
 where
-  K: Into<Bytes> + Clone + Debug + Hash + Eq,
-  V: Into<Bytes> + Clone + Debug,
+    K: Into<Bytes> + Clone + Debug + Hash + Eq,
+    V: Into<Bytes> + Clone + Debug,
 {
-  fn from(map: HashMap<K, V>) -> Bytes {
-    let mut bytes: Vec<u8> = vec![];
-    bytes.extend_from_slice(to_int(map.len() as i32).as_slice());
-    bytes = map.iter().fold(bytes, |mut acc, (k, v)| {
-      let key_bytes: Bytes = k.clone().into();
-      let val_bytes: Bytes = v.clone().into();
-      acc.extend_from_slice(Value::new_normal(key_bytes).into_cbytes().as_slice());
-      acc.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      acc
-    });
-    Bytes(bytes)
-  }
+    fn from(map: HashMap<K, V>) -> Bytes {
+        let mut bytes: Vec<u8> = vec![];
+        bytes.extend_from_slice(to_int(map.len() as i32).as_slice());
+        bytes = map.iter().fold(bytes, |mut acc, (k, v)| {
+            let key_bytes: Bytes = k.clone().into();
+            let val_bytes: Bytes = v.clone().into();
+            acc.extend_from_slice(Value::new_normal(key_bytes).into_cbytes().as_slice());
+            acc.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            acc
+        });
+        Bytes(bytes)
+    }
 }
 
 #[cfg(test)]
 mod tests {
 
-  use super::*;
-  use crate::frame::traits::IntoBytes;
-
-  #[test]
-  fn test_value_type_into_cbytes() {
-    // normal value types
-    let normal_type = ValueType::Normal(1);
-    assert_eq!(normal_type.into_cbytes(), vec![0, 0, 0, 1]);
-    // null value types
-    let null_type = ValueType::Null;
-    assert_eq!(null_type.into_cbytes(), vec![255, 255, 255, 255]);
-    // not set value types
-    let not_set = ValueType::NotSet;
-    assert_eq!(not_set.into_cbytes(), vec![255, 255, 255, 254])
-  }
-
-  #[test]
-  fn test_new_normal_value() {
-    let plain_value = "hello";
-    let len = plain_value.len() as i32;
-    let normal_value = Value::new_normal(plain_value);
-    assert_eq!(normal_value.body, b"hello");
-    match normal_value.value_type {
-      ValueType::Normal(l) => assert_eq!(l, len),
-      _ => unreachable!(),
-    }
-  }
-
-  #[test]
-  fn test_new_normal_value_all_types() {
-    let _ = Value::new_normal("hello");
-    let _ = Value::new_normal("hello".to_string());
-    let _ = Value::new_normal(1 as u8);
-    let _ = Value::new_normal(1 as u16);
-    let _ = Value::new_normal(1 as u32);
-    let _ = Value::new_normal(1 as u64);
-    let _ = Value::new_normal(1 as i8);
-    let _ = Value::new_normal(1 as i16);
-    let _ = Value::new_normal(1 as i32);
-    let _ = Value::new_normal(1 as i64);
-    let _ = Value::new_normal(true);
-  }
-
-  #[test]
-  fn test_new_null_value() {
-    let null_value = Value::new_null();
-    assert_eq!(null_value.body, vec![]);
-    match null_value.value_type {
-      ValueType::Null => assert!(true),
-      _ => unreachable!(),
-    }
-  }
-
-  #[test]
-  fn test_new_not_set_value() {
-    let not_set_value = Value::new_not_set();
-    assert_eq!(not_set_value.body, vec![]);
-    match not_set_value.value_type {
-      ValueType::NotSet => assert!(true),
-      _ => unreachable!(),
-    }
-  }
-
-  #[test]
-  fn test_value_into_cbytes() {
-    let value = Value::new_normal(1 as u8);
-    assert_eq!(value.into_cbytes(), vec![0, 0, 0, 1, 1]);
-  }
+    use super::*;
+    use crate::frame::traits::IntoBytes;
+
+    #[test]
+    fn test_value_type_into_cbytes() {
+        // normal value types
+        let normal_type = ValueType::Normal(1);
+        assert_eq!(normal_type.into_cbytes(), vec![0, 0, 0, 1]);
+        // null value types
+        let null_type = ValueType::Null;
+        assert_eq!(null_type.into_cbytes(), vec![255, 255, 255, 255]);
+        // not set value types
+        let not_set = ValueType::NotSet;
+        assert_eq!(not_set.into_cbytes(), vec![255, 255, 255, 254])
+    }
+
+    #[test]
+    fn test_new_normal_value() {
+        let plain_value = "hello";
+        let len = plain_value.len() as i32;
+        let normal_value = Value::new_normal(plain_value);
+        assert_eq!(normal_value.body, b"hello");
+        match normal_value.value_type {
+            ValueType::Normal(l) => assert_eq!(l, len),
+            _ => unreachable!(),
+        }
+    }
 
+    #[test]
+    fn test_new_normal_value_all_types() {
+        let _ = Value::new_normal("hello");
+        let _ = Value::new_normal("hello".to_string());
+        let _ = Value::new_normal(1 as u8);
+        let _ = Value::new_normal(1 as u16);
+        let _ = Value::new_normal(1 as u32);
+        let _ = Value::new_normal(1 as u64);
+        let _ = Value::new_normal(1 as i8);
+        let _ = Value::new_normal(1 as i16);
+        let _ = Value::new_normal(1 as i32);
+        let _ = Value::new_normal(1 as i64);
+        let _ = Value::new_normal(true);
+    }
+
+    #[test]
+    fn test_new_null_value() {
+        let null_value = Value::new_null();
+        assert_eq!(null_value.body, vec![]);
+        match null_value.value_type {
+            ValueType::Null => assert!(true),
+            _ => unreachable!(),
+        }
+    }
+
+    #[test]
+    fn test_new_not_set_value() {
+        let not_set_value = Value::new_not_set();
+        assert_eq!(not_set_value.body, vec![]);
+        match not_set_value.value_type {
+            ValueType::NotSet => assert!(true),
+            _ => unreachable!(),
+        }
+    }
+
+    #[test]
+    fn test_value_into_cbytes() {
+        let value = Value::new_normal(1 as u8);
+        assert_eq!(value.into_cbytes(), vec![0, 0, 0, 1, 1]);
+    }
 }


Test patch:
diff --git a/tests/collection_types.rs b/tests/collection_types.rs
index d4e345c..89a1436 100644
--- a/tests/collection_types.rs
+++ b/tests/collection_types.rs
@@ -36,413 +36,413 @@ use std::str::FromStr;
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn list() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_lists \
-             (my_text_list frozen<list<text>> PRIMARY KEY, \
-             my_nested_list list<frozen<list<int>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_list = vec!["text1", "text2", "text3"];
-  let my_nested_list: Vec<Vec<i32>> =
-    vec![vec![1, 2, 3], vec![999, 888, 777, 666, 555], vec![-1, -2]];
-  let values = query_values!(my_text_list.clone(), my_nested_list.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_lists \
-             (my_text_list, my_nested_list) VALUES (?, ?)";
-  session
-    .query_with_values(cql, values)
-    .expect("insert lists error");
-
-  let cql = "SELECT * FROM cdrs_test.test_lists";
-  let rows = session
-    .query(cql)
-    .expect("query lists error")
-    .get_body()
-    .expect("get body with lists error")
-    .into_rows()
-    .expect("converting body with lists into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_list_row: Vec<String> = row
-      .r_by_name::<List>("my_text_list")
-      .expect("my_text_list")
-      .as_r_rust()
-      .expect("my_text_list as rust");
-    let my_nested_list_outer_row: Vec<List> = row
-      .r_by_name::<List>("my_nested_list")
-      .expect("my_nested_list")
-      .as_r_rust()
-      .expect("my_nested_list (outer) as rust");
-    let mut my_nested_list_row = Vec::with_capacity(my_nested_list_outer_row.len());
-    for my_nested_list_inner_row in my_nested_list_outer_row {
-      let my_nested_list_inner_row: Vec<i32> = my_nested_list_inner_row
-        .as_r_rust()
-        .expect("my_nested_list (inner) as rust");
-      my_nested_list_row.push(my_nested_list_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_lists \
+               (my_text_list frozen<list<text>> PRIMARY KEY, \
+               my_nested_list list<frozen<list<int>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_list = vec!["text1", "text2", "text3"];
+    let my_nested_list: Vec<Vec<i32>> =
+        vec![vec![1, 2, 3], vec![999, 888, 777, 666, 555], vec![-1, -2]];
+    let values = query_values!(my_text_list.clone(), my_nested_list.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_lists \
+               (my_text_list, my_nested_list) VALUES (?, ?)";
+    session
+        .query_with_values(cql, values)
+        .expect("insert lists error");
+
+    let cql = "SELECT * FROM cdrs_test.test_lists";
+    let rows = session
+        .query(cql)
+        .expect("query lists error")
+        .get_body()
+        .expect("get body with lists error")
+        .into_rows()
+        .expect("converting body with lists into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_list_row: Vec<String> = row
+            .r_by_name::<List>("my_text_list")
+            .expect("my_text_list")
+            .as_r_rust()
+            .expect("my_text_list as rust");
+        let my_nested_list_outer_row: Vec<List> = row
+            .r_by_name::<List>("my_nested_list")
+            .expect("my_nested_list")
+            .as_r_rust()
+            .expect("my_nested_list (outer) as rust");
+        let mut my_nested_list_row = Vec::with_capacity(my_nested_list_outer_row.len());
+        for my_nested_list_inner_row in my_nested_list_outer_row {
+            let my_nested_list_inner_row: Vec<i32> = my_nested_list_inner_row
+                .as_r_rust()
+                .expect("my_nested_list (inner) as rust");
+            my_nested_list_row.push(my_nested_list_inner_row);
+        }
+        assert_eq!(my_text_list_row, vec!["text1", "text2", "text3"]);
+        assert_eq!(my_nested_list_row, my_nested_list);
     }
-    assert_eq!(my_text_list_row, vec!["text1", "text2", "text3"]);
-    assert_eq!(my_nested_list_row, my_nested_list);
-  }
 }
 
 #[test]
 #[ignore]
 #[cfg(all(feature = "v4", feature = "e2e-tests"))]
 fn list_v4() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_lists_v4 \
-             (my_text_list frozen<list<text>> PRIMARY KEY, \
-             my_nested_list list<frozen<list<smallint>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_list = vec![
-    "text1".to_string(),
-    "text2".to_string(),
-    "text3".to_string(),
-  ];
-  let my_nested_list: Vec<Vec<i16>> =
-    vec![vec![1, 2, 3], vec![999, 888, 777, 666, 555], vec![-1, -2]];
-  let values = query_values!(my_text_list.clone(), my_nested_list.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_lists_v4 \
-             (my_text_list, my_nested_list) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_lists_v4";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_list_row: Vec<String> = row
-      .r_by_name::<List>("my_text_list")
-      .expect("my_text_list")
-      .as_r_rust()
-      .expect("my_text_list as rust");
-    let my_nested_list_outer_row: Vec<List> = row
-      .r_by_name::<List>("my_nested_list")
-      .expect("my_nested_list")
-      .as_r_rust()
-      .expect("my_nested_list (outer) as rust");
-    let mut my_nested_list_row = Vec::with_capacity(my_nested_list_outer_row.len());
-    for my_nested_list_inner_row in my_nested_list_outer_row {
-      let my_nested_list_inner_row: Vec<i16> = my_nested_list_inner_row
-        .as_r_rust()
-        .expect("my_nested_list (inner) as rust");
-      my_nested_list_row.push(my_nested_list_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_lists_v4 \
+               (my_text_list frozen<list<text>> PRIMARY KEY, \
+               my_nested_list list<frozen<list<smallint>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_list = vec![
+        "text1".to_string(),
+        "text2".to_string(),
+        "text3".to_string(),
+    ];
+    let my_nested_list: Vec<Vec<i16>> =
+        vec![vec![1, 2, 3], vec![999, 888, 777, 666, 555], vec![-1, -2]];
+    let values = query_values!(my_text_list.clone(), my_nested_list.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_lists_v4 \
+               (my_text_list, my_nested_list) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_lists_v4";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_list_row: Vec<String> = row
+            .r_by_name::<List>("my_text_list")
+            .expect("my_text_list")
+            .as_r_rust()
+            .expect("my_text_list as rust");
+        let my_nested_list_outer_row: Vec<List> = row
+            .r_by_name::<List>("my_nested_list")
+            .expect("my_nested_list")
+            .as_r_rust()
+            .expect("my_nested_list (outer) as rust");
+        let mut my_nested_list_row = Vec::with_capacity(my_nested_list_outer_row.len());
+        for my_nested_list_inner_row in my_nested_list_outer_row {
+            let my_nested_list_inner_row: Vec<i16> = my_nested_list_inner_row
+                .as_r_rust()
+                .expect("my_nested_list (inner) as rust");
+            my_nested_list_row.push(my_nested_list_inner_row);
+        }
+        assert_eq!(my_text_list_row, my_text_list);
+        assert_eq!(my_nested_list_row, my_nested_list);
     }
-    assert_eq!(my_text_list_row, my_text_list);
-    assert_eq!(my_nested_list_row, my_nested_list);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn set() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_sets \
-             (my_text_set frozen<set<text>> PRIMARY KEY, \
-             my_nested_set set<frozen<set<int>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_set = vec![
-    "text1".to_string(),
-    "text2".to_string(),
-    "text3".to_string(),
-  ];
-  let my_nested_set: Vec<Vec<i32>> =
-    vec![vec![-2, -1], vec![1, 2, 3], vec![555, 666, 777, 888, 999]];
-  let values = query_values!(my_text_set.clone(), my_nested_set.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_sets \
-             (my_text_set, my_nested_set) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_sets";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_set_row: Vec<String> = row
-      .r_by_name::<List>("my_text_set")
-      .expect("my_text_set")
-      .as_r_rust()
-      .expect("my_text_set as rust");
-    let my_nested_set_outer_row: Vec<List> = row
-      .r_by_name::<List>("my_nested_set")
-      .expect("my_nested_set")
-      .as_r_rust()
-      .expect("my_nested_set (outer) as rust");
-    let mut my_nested_set_row = Vec::with_capacity(my_nested_set_outer_row.len());
-    for my_nested_set_inner_row in my_nested_set_outer_row {
-      let my_nested_set_inner_row: Vec<i32> = my_nested_set_inner_row
-        .as_r_rust()
-        .expect("my_nested_set (inner) as rust");
-      my_nested_set_row.push(my_nested_set_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_sets \
+               (my_text_set frozen<set<text>> PRIMARY KEY, \
+               my_nested_set set<frozen<set<int>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_set = vec![
+        "text1".to_string(),
+        "text2".to_string(),
+        "text3".to_string(),
+    ];
+    let my_nested_set: Vec<Vec<i32>> =
+        vec![vec![-2, -1], vec![1, 2, 3], vec![555, 666, 777, 888, 999]];
+    let values = query_values!(my_text_set.clone(), my_nested_set.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_sets \
+               (my_text_set, my_nested_set) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_sets";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_set_row: Vec<String> = row
+            .r_by_name::<List>("my_text_set")
+            .expect("my_text_set")
+            .as_r_rust()
+            .expect("my_text_set as rust");
+        let my_nested_set_outer_row: Vec<List> = row
+            .r_by_name::<List>("my_nested_set")
+            .expect("my_nested_set")
+            .as_r_rust()
+            .expect("my_nested_set (outer) as rust");
+        let mut my_nested_set_row = Vec::with_capacity(my_nested_set_outer_row.len());
+        for my_nested_set_inner_row in my_nested_set_outer_row {
+            let my_nested_set_inner_row: Vec<i32> = my_nested_set_inner_row
+                .as_r_rust()
+                .expect("my_nested_set (inner) as rust");
+            my_nested_set_row.push(my_nested_set_inner_row);
+        }
+        assert_eq!(my_text_set_row, my_text_set);
+        assert_eq!(my_nested_set_row, my_nested_set);
     }
-    assert_eq!(my_text_set_row, my_text_set);
-    assert_eq!(my_nested_set_row, my_nested_set);
-  }
 }
 
 #[test]
 #[cfg(all(feature = "v4", feature = "e2e-tests"))]
 fn set_v4() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_sets_v4 \
-             (my_text_set frozen<set<text>> PRIMARY KEY, \
-             my_nested_set set<frozen<set<smallint>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_set = vec![
-    "text1".to_string(),
-    "text2".to_string(),
-    "text3".to_string(),
-  ];
-  let my_nested_set: Vec<Vec<i16>> =
-    vec![vec![-2, -1], vec![1, 2, 3], vec![555, 666, 777, 888, 999]];
-  let values = query_values!(my_text_set.clone(), my_nested_set.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_sets_v4 \
-             (my_text_set, my_nested_set) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_sets_v4";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_set_row: Vec<String> = row
-      .r_by_name::<List>("my_text_set")
-      .expect("my_text_set")
-      .as_r_rust()
-      .expect("my_text_set as rust");
-    let my_nested_set_outer_row: Vec<List> = row
-      .r_by_name::<List>("my_nested_set")
-      .expect("my_nested_set")
-      .as_r_rust()
-      .expect("my_nested_set (outer) as rust");
-    let mut my_nested_set_row = Vec::with_capacity(my_nested_set_outer_row.len());
-    for my_nested_set_inner_row in my_nested_set_outer_row {
-      let my_nested_set_inner_row: Vec<i16> = my_nested_set_inner_row
-        .as_r_rust()
-        .expect("my_nested_set (inner) as rust");
-      my_nested_set_row.push(my_nested_set_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_sets_v4 \
+               (my_text_set frozen<set<text>> PRIMARY KEY, \
+               my_nested_set set<frozen<set<smallint>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_set = vec![
+        "text1".to_string(),
+        "text2".to_string(),
+        "text3".to_string(),
+    ];
+    let my_nested_set: Vec<Vec<i16>> =
+        vec![vec![-2, -1], vec![1, 2, 3], vec![555, 666, 777, 888, 999]];
+    let values = query_values!(my_text_set.clone(), my_nested_set.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_sets_v4 \
+               (my_text_set, my_nested_set) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_sets_v4";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_set_row: Vec<String> = row
+            .r_by_name::<List>("my_text_set")
+            .expect("my_text_set")
+            .as_r_rust()
+            .expect("my_text_set as rust");
+        let my_nested_set_outer_row: Vec<List> = row
+            .r_by_name::<List>("my_nested_set")
+            .expect("my_nested_set")
+            .as_r_rust()
+            .expect("my_nested_set (outer) as rust");
+        let mut my_nested_set_row = Vec::with_capacity(my_nested_set_outer_row.len());
+        for my_nested_set_inner_row in my_nested_set_outer_row {
+            let my_nested_set_inner_row: Vec<i16> = my_nested_set_inner_row
+                .as_r_rust()
+                .expect("my_nested_set (inner) as rust");
+            my_nested_set_row.push(my_nested_set_inner_row);
+        }
+        assert_eq!(my_text_set_row, my_text_set);
+        assert_eq!(my_nested_set_row, my_nested_set);
     }
-    assert_eq!(my_text_set_row, my_text_set);
-    assert_eq!(my_nested_set_row, my_nested_set);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn map_without_blob() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps_without_blob \
-             (my_key int PRIMARY KEY, \
-             my_text_map map<text, text>, \
-             my_nested_map map<uuid, frozen<map<bigint, int>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_map = hashmap! {
-      "key1".to_string() => "value1".to_string(),
-      "key2".to_string() => "value2".to_string(),
-      "key3".to_string() => "value3".to_string(),
-  };
-  let my_nested_map: HashMap<Uuid, HashMap<i64, i32>> = hashmap! {
-      Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
-          1 => 1,
-          2 => 2,
-      },
-      Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
-          1 => 1,
-      },
-      Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
-          1 => 1,
-          2 => 2,
-          3 => 3,
-      },
-  };
-  let values = query_values!(0i32, my_text_map.clone(), my_nested_map.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_maps_without_blob \
-             (my_key, my_text_map, my_nested_map) VALUES (?, ?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_maps_without_blob";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_map_row: HashMap<String, String> = row
-      .r_by_name::<Map>("my_text_map")
-      .expect("my_text_map")
-      .as_r_rust()
-      .expect("my_text_map as rust");
-    let my_nested_map_outer_row: HashMap<Uuid, Map> = row
-      .r_by_name::<Map>("my_nested_map")
-      .expect("my_nested_map")
-      .as_r_rust()
-      .expect("my_nested_map (outer) as rust");
-    let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
-    for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
-      let my_nested_map_inner_row: HashMap<i64, i32> = my_nested_map_inner_row
-        .as_r_rust()
-        .expect("my_nested_map (inner) as rust");
-      my_nested_map_row.insert(index, my_nested_map_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps_without_blob \
+               (my_key int PRIMARY KEY, \
+               my_text_map map<text, text>, \
+               my_nested_map map<uuid, frozen<map<bigint, int>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_map = hashmap! {
+        "key1".to_string() => "value1".to_string(),
+        "key2".to_string() => "value2".to_string(),
+        "key3".to_string() => "value3".to_string(),
+    };
+    let my_nested_map: HashMap<Uuid, HashMap<i64, i32>> = hashmap! {
+        Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
+            1 => 1,
+            2 => 2,
+        },
+        Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
+            1 => 1,
+        },
+        Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
+            1 => 1,
+            2 => 2,
+            3 => 3,
+        },
+    };
+    let values = query_values!(0i32, my_text_map.clone(), my_nested_map.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_maps_without_blob \
+               (my_key, my_text_map, my_nested_map) VALUES (?, ?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_maps_without_blob";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_map_row: HashMap<String, String> = row
+            .r_by_name::<Map>("my_text_map")
+            .expect("my_text_map")
+            .as_r_rust()
+            .expect("my_text_map as rust");
+        let my_nested_map_outer_row: HashMap<Uuid, Map> = row
+            .r_by_name::<Map>("my_nested_map")
+            .expect("my_nested_map")
+            .as_r_rust()
+            .expect("my_nested_map (outer) as rust");
+        let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
+        for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
+            let my_nested_map_inner_row: HashMap<i64, i32> = my_nested_map_inner_row
+                .as_r_rust()
+                .expect("my_nested_map (inner) as rust");
+            my_nested_map_row.insert(index, my_nested_map_inner_row);
+        }
+        assert_eq!(my_text_map_row, my_text_map);
+        assert_eq!(my_nested_map_row, my_nested_map);
     }
-    assert_eq!(my_text_map_row, my_text_map);
-    assert_eq!(my_nested_map_row, my_nested_map);
-  }
 }
 
 #[test]
 #[cfg(all(feature = "v4", feature = "e2e-tests"))]
 fn map_without_blob_v4() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps_without_blob_v4 \
-             (my_text_map frozen<map<text, text>> PRIMARY KEY, \
-             my_nested_map map<uuid, frozen<map<bigint, tinyint>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_map = hashmap! {
-      "key1".to_string() => "value1".to_string(),
-      "key2".to_string() => "value2".to_string(),
-      "key3".to_string() => "value3".to_string(),
-  };
-  let my_nested_map: HashMap<Uuid, HashMap<i64, i8>> = hashmap! {
-      Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
-          1 => 1,
-          2 => 2,
-      },
-      Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
-          1 => 1,
-      },
-      Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
-          1 => 1,
-          2 => 2,
-          3 => 3,
-      },
-  };
-  let values = query_values!(my_text_map.clone(), my_nested_map.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_maps_without_blob_v4 \
-             (my_text_map, my_nested_map) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_maps_without_blob_v4";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_map_row: HashMap<String, String> = row
-      .r_by_name::<Map>("my_text_map")
-      .expect("my_text_map")
-      .as_r_rust()
-      .expect("my_text_map as rust");
-    let my_nested_map_outer_row: HashMap<Uuid, Map> = row
-      .r_by_name::<Map>("my_nested_map")
-      .expect("my_nested_map")
-      .as_r_rust()
-      .expect("my_nested_map (outer) as rust");
-    let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
-    for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
-      let my_nested_map_inner_row: HashMap<i64, i8> = my_nested_map_inner_row
-        .as_r_rust()
-        .expect("my_nested_map (inner) as rust");
-      my_nested_map_row.insert(index, my_nested_map_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps_without_blob_v4 \
+               (my_text_map frozen<map<text, text>> PRIMARY KEY, \
+               my_nested_map map<uuid, frozen<map<bigint, tinyint>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_map = hashmap! {
+        "key1".to_string() => "value1".to_string(),
+        "key2".to_string() => "value2".to_string(),
+        "key3".to_string() => "value3".to_string(),
+    };
+    let my_nested_map: HashMap<Uuid, HashMap<i64, i8>> = hashmap! {
+        Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
+            1 => 1,
+            2 => 2,
+        },
+        Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
+            1 => 1,
+        },
+        Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
+            1 => 1,
+            2 => 2,
+            3 => 3,
+        },
+    };
+    let values = query_values!(my_text_map.clone(), my_nested_map.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_maps_without_blob_v4 \
+               (my_text_map, my_nested_map) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_maps_without_blob_v4";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_map_row: HashMap<String, String> = row
+            .r_by_name::<Map>("my_text_map")
+            .expect("my_text_map")
+            .as_r_rust()
+            .expect("my_text_map as rust");
+        let my_nested_map_outer_row: HashMap<Uuid, Map> = row
+            .r_by_name::<Map>("my_nested_map")
+            .expect("my_nested_map")
+            .as_r_rust()
+            .expect("my_nested_map (outer) as rust");
+        let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
+        for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
+            let my_nested_map_inner_row: HashMap<i64, i8> = my_nested_map_inner_row
+                .as_r_rust()
+                .expect("my_nested_map (inner) as rust");
+            my_nested_map_row.insert(index, my_nested_map_inner_row);
+        }
+        assert_eq!(my_text_map_row, my_text_map);
+        assert_eq!(my_nested_map_row, my_nested_map);
     }
-    assert_eq!(my_text_map_row, my_text_map);
-    assert_eq!(my_nested_map_row, my_nested_map);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn map() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps \
-             (my_text_map frozen<map<text, text>> PRIMARY KEY, \
-             my_nested_map map<uuid, frozen<map<bigint, blob>>>)";
-  let session = setup(cql).expect("setup");
-
-  let my_text_map = hashmap! {
-      "key1".to_string() => "value1".to_string(),
-      "key2".to_string() => "value2".to_string(),
-      "key3".to_string() => "value3".to_string(),
-  };
-  let my_nested_map: HashMap<Uuid, HashMap<i64, Blob>> = hashmap! {
-      Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
-          1 => vec![52, 121, 209, 200, 81, 118, 181, 17].into(),
-          2 => vec![226, 90, 51, 10, 26, 87, 141, 61].into(),
-      },
-      Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
-          1 => vec![224, 155, 148, 6, 217, 96, 120, 38].into(),
-      },
-      Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
-          1 => vec![164, 238, 196, 10, 149, 169, 145, 239].into(),
-          2 => vec![250, 87, 119, 134, 105, 236, 240, 64].into(),
-          3 => vec![72, 81, 26, 173, 107, 96, 38, 91].into(),
-      },
-  };
-  let values = query_values!(my_text_map.clone(), my_nested_map.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_maps \
-             (my_text_map, my_nested_map) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_maps";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_text_map_row: HashMap<String, String> = row
-      .r_by_name::<Map>("my_text_map")
-      .expect("my_text_map")
-      .as_r_rust()
-      .expect("my_text_map as rust");
-    let my_nested_map_outer_row: HashMap<Uuid, Map> = row
-      .r_by_name::<Map>("my_nested_map")
-      .expect("my_nested_map")
-      .as_r_rust()
-      .expect("my_nested_map (outer) as rust");
-    let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
-    for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
-      let my_nested_map_inner_row: HashMap<i64, Blob> = my_nested_map_inner_row
-        .as_r_rust()
-        .expect("my_nested_map (inner) as rust");
-      my_nested_map_row.insert(index, my_nested_map_inner_row);
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_maps \
+               (my_text_map frozen<map<text, text>> PRIMARY KEY, \
+               my_nested_map map<uuid, frozen<map<bigint, blob>>>)";
+    let session = setup(cql).expect("setup");
+
+    let my_text_map = hashmap! {
+        "key1".to_string() => "value1".to_string(),
+        "key2".to_string() => "value2".to_string(),
+        "key3".to_string() => "value3".to_string(),
+    };
+    let my_nested_map: HashMap<Uuid, HashMap<i64, Blob>> = hashmap! {
+        Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap() => hashmap!{
+            1 => vec![52, 121, 209, 200, 81, 118, 181, 17].into(),
+            2 => vec![226, 90, 51, 10, 26, 87, 141, 61].into(),
+        },
+        Uuid::from_str("687d7677-dbf0-4d25-8cf3-e5d9185bba0b").unwrap() => hashmap!{
+            1 => vec![224, 155, 148, 6, 217, 96, 120, 38].into(),
+        },
+        Uuid::from_str("c4dc6e8b-758a-4af4-ab00-ec356fb688d9").unwrap() => hashmap!{
+            1 => vec![164, 238, 196, 10, 149, 169, 145, 239].into(),
+            2 => vec![250, 87, 119, 134, 105, 236, 240, 64].into(),
+            3 => vec![72, 81, 26, 173, 107, 96, 38, 91].into(),
+        },
+    };
+    let values = query_values!(my_text_map.clone(), my_nested_map.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_maps \
+               (my_text_map, my_nested_map) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_maps";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_text_map_row: HashMap<String, String> = row
+            .r_by_name::<Map>("my_text_map")
+            .expect("my_text_map")
+            .as_r_rust()
+            .expect("my_text_map as rust");
+        let my_nested_map_outer_row: HashMap<Uuid, Map> = row
+            .r_by_name::<Map>("my_nested_map")
+            .expect("my_nested_map")
+            .as_r_rust()
+            .expect("my_nested_map (outer) as rust");
+        let mut my_nested_map_row = HashMap::with_capacity(my_nested_map_outer_row.len());
+        for (index, my_nested_map_inner_row) in my_nested_map_outer_row {
+            let my_nested_map_inner_row: HashMap<i64, Blob> = my_nested_map_inner_row
+                .as_r_rust()
+                .expect("my_nested_map (inner) as rust");
+            my_nested_map_row.insert(index, my_nested_map_inner_row);
+        }
+        assert_eq!(my_text_map_row, my_text_map);
+        assert_eq!(my_nested_map_row, my_nested_map);
     }
-    assert_eq!(my_text_map_row, my_text_map);
-    assert_eq!(my_nested_map_row, my_nested_map);
-  }
 }
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 8440598..a763b70 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -21,43 +21,44 @@ type CurrentSession = Session<RoundRobin<TcpConnectionPool<NoneAuthenticator>>>;
 
 #[cfg(feature = "e2e-tests")]
 pub fn setup(create_table_cql: &'static str) -> Result<CurrentSession> {
-  setup_multiple(&[create_table_cql])
+    setup_multiple(&[create_table_cql])
 }
 
 #[cfg(feature = "e2e-tests")]
 pub fn setup_multiple(create_cqls: &[&'static str]) -> Result<CurrentSession> {
-  let node = NodeTcpConfigBuilder::new(ADDR, NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let session = new_session(&cluster_config, lb).expect("session should be created");
-  let re_table_name = Regex::new(r"CREATE TABLE IF NOT EXISTS (\w+\.\w+)").unwrap();
-
-  let create_keyspace_query = "CREATE KEYSPACE IF NOT EXISTS cdrs_test WITH \
-                               replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
-                               AND durable_writes = false";
-  session.query(create_keyspace_query)?;
-
-  for create_cql in create_cqls.iter() {
-    let table_name = re_table_name
-      .captures(create_cql)
-      .map(|cap| cap.get(1).unwrap().as_str());
-
-    // Re-using tables is a lot faster than creating/dropping them for every test.
-    // But if table definitions change while editing tests
-    // the old tables need to be dropped. For example by uncommenting the following lines.
-    // if let Some(table_name) = table_name {
-    //     let cql = format!("DROP TABLE IF EXISTS {}", table_name);
-    //     let query = QueryBuilder::new(cql).finalize();
-    //     session.query(query, true, true)?;
-    // }
-
-    session.query(create_cql.to_owned())?;
-
-    if let Some(table_name) = table_name {
-      let cql = format!("TRUNCATE TABLE {}", table_name);
-      session.query(cql)?;
+    let node = NodeTcpConfigBuilder::new(ADDR, NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let session = new_session(&cluster_config, lb).expect("session should be created");
+    let re_table_name = Regex::new(r"CREATE TABLE IF NOT EXISTS (\w+\.\w+)").unwrap();
+
+    let create_keyspace_query =
+        "CREATE KEYSPACE IF NOT EXISTS cdrs_test WITH \
+         replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
+         AND durable_writes = false";
+    session.query(create_keyspace_query)?;
+
+    for create_cql in create_cqls.iter() {
+        let table_name = re_table_name
+            .captures(create_cql)
+            .map(|cap| cap.get(1).unwrap().as_str());
+
+        // Re-using tables is a lot faster than creating/dropping them for every test.
+        // But if table definitions change while editing tests
+        // the old tables need to be dropped. For example by uncommenting the following lines.
+        // if let Some(table_name) = table_name {
+        //     let cql = format!("DROP TABLE IF EXISTS {}", table_name);
+        //     let query = QueryBuilder::new(cql).finalize();
+        //     session.query(query, true, true)?;
+        // }
+
+        session.query(create_cql.to_owned())?;
+
+        if let Some(table_name) = table_name {
+            let cql = format!("TRUNCATE TABLE {}", table_name);
+            session.query(cql)?;
+        }
     }
-  }
 
-  Ok(session)
+    Ok(session)
 }
diff --git a/tests/derive_traits.rs b/tests/derive_traits.rs
index d8dfa8f..a836de7 100644
--- a/tests/derive_traits.rs
+++ b/tests/derive_traits.rs
@@ -61,300 +61,301 @@ use std::collections::HashMap;
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn simple_udt() {
-  let create_type_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.derive_udt (my_text text)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_derived_udt \
-                          (my_key int PRIMARY KEY, my_udt derive_udt, my_uuid uuid, my_blob blob)";
-  let session = setup_multiple(&[create_type_cql, create_table_cql]).expect("setup");
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
-  struct RowStruct {
-    my_key: i32,
-    my_udt: MyUdt,
-    my_uuid: Uuid,
-    my_blob: Blob,
-  }
-
-  impl RowStruct {
-    fn into_query_values(self) -> QueryValues {
-      query_values!("my_key" => self.my_key, "my_udt" => self.my_udt, "my_uuid" => self.my_uuid, "my_blob" => self.my_blob)
+    let create_type_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.derive_udt (my_text text)";
+    let create_table_cql =
+        "CREATE TABLE IF NOT EXISTS cdrs_test.test_derived_udt \
+         (my_key int PRIMARY KEY, my_udt derive_udt, my_uuid uuid, my_blob blob)";
+    let session = setup_multiple(&[create_type_cql, create_table_cql]).expect("setup");
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
+    struct RowStruct {
+        my_key: i32,
+        my_udt: MyUdt,
+        my_uuid: Uuid,
+        my_blob: Blob,
+    }
+
+    impl RowStruct {
+        fn into_query_values(self) -> QueryValues {
+            query_values!("my_key" => self.my_key, "my_udt" => self.my_udt, "my_uuid" => self.my_uuid, "my_blob" => self.my_blob)
+        }
+    }
+
+    #[derive(Debug, Clone, PartialEq, IntoCDRSValue, TryFromUDT)]
+    struct MyUdt {
+        pub my_text: String,
+    }
+
+    let row_struct = RowStruct {
+        my_key: 1i32,
+        my_udt: MyUdt {
+            my_text: "my_text".to_string(),
+        },
+        my_uuid: Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap(),
+        my_blob: Blob::new(vec![]),
+    };
+
+    let cql = "INSERT INTO cdrs_test.test_derived_udt \
+               (my_key, my_udt, my_uuid, my_blob) VALUES (?, ?, ?, ?)";
+    session
+        .query_with_values(cql, row_struct.clone().into_query_values())
+        .expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_derived_udt";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_udt_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
+        assert_eq!(my_udt_row, row_struct);
     }
-  }
-
-  #[derive(Debug, Clone, PartialEq, IntoCDRSValue, TryFromUDT)]
-  struct MyUdt {
-    pub my_text: String,
-  }
-
-  let row_struct = RowStruct {
-    my_key: 1i32,
-    my_udt: MyUdt {
-      my_text: "my_text".to_string(),
-    },
-    my_uuid: Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap(),
-    my_blob: Blob::new(vec![]),
-  };
-
-  let cql = "INSERT INTO cdrs_test.test_derived_udt \
-             (my_key, my_udt, my_uuid, my_blob) VALUES (?, ?, ?, ?)";
-  session
-    .query_with_values(cql, row_struct.clone().into_query_values())
-    .expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_derived_udt";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_udt_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
-    assert_eq!(my_udt_row, row_struct);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn nested_udt() {
-  let create_type1_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_inner_udt (my_text text)";
-  let create_type2_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_outer_udt \
-                          (my_inner_udt frozen<nested_inner_udt>)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_udt \
-                          (my_key int PRIMARY KEY, my_outer_udt nested_outer_udt)";
-  let session =
-    setup_multiple(&[create_type1_cql, create_type2_cql, create_table_cql]).expect("setup");
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
-  struct RowStruct {
-    my_key: i32,
-    my_outer_udt: MyOuterUdt,
-  }
-
-  impl RowStruct {
-    fn into_query_values(self) -> QueryValues {
-      query_values!("my_key" => self.my_key, "my_outer_udt" => self.my_outer_udt)
+    let create_type1_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_inner_udt (my_text text)";
+    let create_type2_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_outer_udt \
+                            (my_inner_udt frozen<nested_inner_udt>)";
+    let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_udt \
+                            (my_key int PRIMARY KEY, my_outer_udt nested_outer_udt)";
+    let session =
+        setup_multiple(&[create_type1_cql, create_type2_cql, create_table_cql]).expect("setup");
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
+    struct RowStruct {
+        my_key: i32,
+        my_outer_udt: MyOuterUdt,
+    }
+
+    impl RowStruct {
+        fn into_query_values(self) -> QueryValues {
+            query_values!("my_key" => self.my_key, "my_outer_udt" => self.my_outer_udt)
+        }
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
+    struct MyInnerUdt {
+        pub my_text: String,
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
+    struct MyOuterUdt {
+        pub my_inner_udt: MyInnerUdt,
+    }
+
+    let row_struct = RowStruct {
+        my_key: 0,
+        my_outer_udt: MyOuterUdt {
+            my_inner_udt: MyInnerUdt {
+                my_text: "my_text".to_string(),
+            },
+        },
+    };
+
+    let cql = "INSERT INTO cdrs_test.test_nested_udt \
+               (my_key, my_outer_udt) VALUES (?, ?)";
+    session
+        .query_with_values(cql, row_struct.clone().into_query_values())
+        .expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_nested_udt";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_row_struct: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
+        assert_eq!(my_row_struct, row_struct);
     }
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
-  struct MyInnerUdt {
-    pub my_text: String,
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
-  struct MyOuterUdt {
-    pub my_inner_udt: MyInnerUdt,
-  }
-
-  let row_struct = RowStruct {
-    my_key: 0,
-    my_outer_udt: MyOuterUdt {
-      my_inner_udt: MyInnerUdt {
-        my_text: "my_text".to_string(),
-      },
-    },
-  };
-
-  let cql = "INSERT INTO cdrs_test.test_nested_udt \
-             (my_key, my_outer_udt) VALUES (?, ?)";
-  session
-    .query_with_values(cql, row_struct.clone().into_query_values())
-    .expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_nested_udt";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_row_struct: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
-    assert_eq!(my_row_struct, row_struct);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn alter_udt_add() {
-  let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.test_alter_udt_add";
-  let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.alter_udt_add_udt";
-  let create_type_cql = "CREATE TYPE cdrs_test.alter_udt_add_udt (my_text text)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_alter_udt_add \
-                          (my_key int PRIMARY KEY, my_map frozen<map<text, alter_udt_add_udt>>)";
-  let session = setup_multiple(&[
-    drop_table_cql,
-    drop_type_cql,
-    create_type_cql,
-    create_table_cql,
-  ])
-  .expect("setup");
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
-  struct RowStruct {
-    my_key: i32,
-    my_map: HashMap<String, MyUdtA>,
-  }
-
-  impl RowStruct {
-    fn into_query_values(self) -> QueryValues {
-      query_values!("my_key" => self.my_key, "my_map" => self.my_map)
+    let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.test_alter_udt_add";
+    let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.alter_udt_add_udt";
+    let create_type_cql = "CREATE TYPE cdrs_test.alter_udt_add_udt (my_text text)";
+    let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_alter_udt_add \
+                            (my_key int PRIMARY KEY, my_map frozen<map<text, alter_udt_add_udt>>)";
+    let session = setup_multiple(&[
+        drop_table_cql,
+        drop_type_cql,
+        create_type_cql,
+        create_table_cql,
+    ])
+    .expect("setup");
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
+    struct RowStruct {
+        my_key: i32,
+        my_map: HashMap<String, MyUdtA>,
+    }
+
+    impl RowStruct {
+        fn into_query_values(self) -> QueryValues {
+            query_values!("my_key" => self.my_key, "my_map" => self.my_map)
+        }
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
+    struct MyUdtA {
+        pub my_text: String,
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
+    struct RowStructB {
+        my_key: i32,
+        my_map: HashMap<String, MyUdtB>,
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
+    struct MyUdtB {
+        pub my_text: String,
+        pub my_timestamp: Option<Timespec>,
+    }
+
+    let row_struct = RowStruct {
+        my_key: 0,
+        my_map: hashmap! { "1".to_string() => MyUdtA {my_text: "my_text".to_string()} },
+    };
+
+    let cql = "INSERT INTO cdrs_test.test_alter_udt_add \
+               (my_key, my_map) VALUES (?, ?)";
+    session
+        .query_with_values(cql, row_struct.clone().into_query_values())
+        .expect("insert");
+
+    let cql = "ALTER TYPE cdrs_test.alter_udt_add_udt ADD my_timestamp timestamp";
+    session.query(cql).expect("alter type");
+
+    let expected_nested_udt = MyUdtB {
+        my_text: "my_text".to_string(),
+        my_timestamp: None,
+    };
+
+    let cql = "SELECT * FROM cdrs_test.test_alter_udt_add";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let altered_row: RowStructB = RowStructB::try_from_row(row).expect("into RowStructB");
+        assert_eq!(
+            altered_row.my_map,
+            hashmap! { "1".to_string() => expected_nested_udt.clone() }
+        );
     }
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
-  struct MyUdtA {
-    pub my_text: String,
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
-  struct RowStructB {
-    my_key: i32,
-    my_map: HashMap<String, MyUdtB>,
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
-  struct MyUdtB {
-    pub my_text: String,
-    pub my_timestamp: Option<Timespec>,
-  }
-
-  let row_struct = RowStruct {
-    my_key: 0,
-    my_map: hashmap! { "1".to_string() => MyUdtA {my_text: "my_text".to_string()} },
-  };
-
-  let cql = "INSERT INTO cdrs_test.test_alter_udt_add \
-             (my_key, my_map) VALUES (?, ?)";
-  session
-    .query_with_values(cql, row_struct.clone().into_query_values())
-    .expect("insert");
-
-  let cql = "ALTER TYPE cdrs_test.alter_udt_add_udt ADD my_timestamp timestamp";
-  session.query(cql).expect("alter type");
-
-  let expected_nested_udt = MyUdtB {
-    my_text: "my_text".to_string(),
-    my_timestamp: None,
-  };
-
-  let cql = "SELECT * FROM cdrs_test.test_alter_udt_add";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let altered_row: RowStructB = RowStructB::try_from_row(row).expect("into RowStructB");
-    assert_eq!(
-      altered_row.my_map,
-      hashmap! { "1".to_string() => expected_nested_udt.clone() }
-    );
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn update_list_with_udt() {
-  let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.update_list_with_udt";
-  let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.update_list_with_udt";
-  let create_type_cql = "CREATE TYPE cdrs_test.update_list_with_udt (id uuid,
+    let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.update_list_with_udt";
+    let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.update_list_with_udt";
+    let create_type_cql = "CREATE TYPE cdrs_test.update_list_with_udt (id uuid,
     text text)";
-  let create_table_cql =
-    "CREATE TABLE IF NOT EXISTS cdrs_test.update_list_with_udt \
-     (id uuid PRIMARY KEY, udts_set set<frozen<cdrs_test.update_list_with_udt>>)";
-  let session = setup_multiple(&[
-    drop_table_cql,
-    drop_type_cql,
-    create_type_cql,
-    create_table_cql,
-  ])
-  .expect("setup");
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
-  struct RowStruct {
-    id: Uuid,
-    udts_set: Vec<MyUdt>,
-  }
-
-  impl RowStruct {
-    fn into_query_values(self) -> QueryValues {
-      query_values!("id" => self.id, "udts_set" => self.udts_set)
+    let create_table_cql =
+        "CREATE TABLE IF NOT EXISTS cdrs_test.update_list_with_udt \
+         (id uuid PRIMARY KEY, udts_set set<frozen<cdrs_test.update_list_with_udt>>)";
+    let session = setup_multiple(&[
+        drop_table_cql,
+        drop_type_cql,
+        create_type_cql,
+        create_table_cql,
+    ])
+    .expect("setup");
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromRow, PartialEq)]
+    struct RowStruct {
+        id: Uuid,
+        udts_set: Vec<MyUdt>,
+    }
+
+    impl RowStruct {
+        fn into_query_values(self) -> QueryValues {
+            query_values!("id" => self.id, "udts_set" => self.udts_set)
+        }
+    }
+
+    #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
+    struct MyUdt {
+        pub id: Uuid,
+        pub text: String,
+    }
+
+    let row_struct = RowStruct {
+        id: Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").expect("row id"),
+        udts_set: vec![MyUdt {
+            id: Uuid::parse_str("08f49fa5-934b-4aff-8a87-f3a3287296ba").expect("udt id"),
+            text: "text".into(),
+        }],
+    };
+
+    let cql = "INSERT INTO cdrs_test.update_list_with_udt \
+               (id, udts_set) VALUES (?, ?)";
+    session
+        .query_with_values(cql, row_struct.clone().into_query_values())
+        .expect("insert");
+
+    let query = session
+        .prepare("UPDATE cdrs_test.update_list_with_udt SET udts_set = udts_set + ? WHERE id = ?")
+        .expect("prepare query");
+    let params = QueryParamsBuilder::new()
+        .consistency(Consistency::Quorum)
+        .values(query_values!(
+            vec![MyUdt {
+                id: Uuid::parse_str("68f49fa5-934b-4aff-8a87-f3a32872a6ba").expect("udt id"),
+                text: "abc".into(),
+            }],
+            Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").unwrap()
+        ));
+    session
+        .exec_with_params(&query, params.finalize())
+        .expect("update set");
+
+    let expected_row_struct = RowStruct {
+        id: Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").expect("row id"),
+        udts_set: vec![
+            MyUdt {
+                id: Uuid::parse_str("08f49fa5-934b-4aff-8a87-f3a3287296ba").expect("udt id"),
+                text: "text".into(),
+            },
+            MyUdt {
+                id: Uuid::parse_str("68f49fa5-934b-4aff-8a87-f3a32872a6ba").expect("udt id"),
+                text: "abc".into(),
+            },
+        ],
+    };
+
+    let cql = "SELECT * FROM cdrs_test.update_list_with_udt";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let altered_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
+        assert_eq!(altered_row, expected_row_struct);
     }
-  }
-
-  #[derive(Clone, Debug, IntoCDRSValue, TryFromUDT, PartialEq)]
-  struct MyUdt {
-    pub id: Uuid,
-    pub text: String,
-  }
-
-  let row_struct = RowStruct {
-    id: Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").expect("row id"),
-    udts_set: vec![MyUdt {
-      id: Uuid::parse_str("08f49fa5-934b-4aff-8a87-f3a3287296ba").expect("udt id"),
-      text: "text".into(),
-    }],
-  };
-
-  let cql = "INSERT INTO cdrs_test.update_list_with_udt \
-             (id, udts_set) VALUES (?, ?)";
-  session
-    .query_with_values(cql, row_struct.clone().into_query_values())
-    .expect("insert");
-
-  let query = session
-    .prepare("UPDATE cdrs_test.update_list_with_udt SET udts_set = udts_set + ? WHERE id = ?")
-    .expect("prepare query");
-  let params = QueryParamsBuilder::new()
-    .consistency(Consistency::Quorum)
-    .values(query_values!(
-      vec![MyUdt {
-        id: Uuid::parse_str("68f49fa5-934b-4aff-8a87-f3a32872a6ba").expect("udt id"),
-        text: "abc".into(),
-      }],
-      Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").unwrap()
-    ));
-  session
-    .exec_with_params(&query, params.finalize())
-    .expect("update set");
-
-  let expected_row_struct = RowStruct {
-    id: Uuid::parse_str("5bd8877a-e2b2-4d6f-aafd-c3f72a6964cf").expect("row id"),
-    udts_set: vec![
-      MyUdt {
-        id: Uuid::parse_str("08f49fa5-934b-4aff-8a87-f3a3287296ba").expect("udt id"),
-        text: "text".into(),
-      },
-      MyUdt {
-        id: Uuid::parse_str("68f49fa5-934b-4aff-8a87-f3a32872a6ba").expect("udt id"),
-        text: "abc".into(),
-      },
-    ],
-  };
-
-  let cql = "SELECT * FROM cdrs_test.update_list_with_udt";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let altered_row: RowStruct = RowStruct::try_from_row(row).expect("into RowStruct");
-    assert_eq!(altered_row, expected_row_struct);
-  }
 }
diff --git a/tests/keyspace.rs b/tests/keyspace.rs
index 8f52f12..99b06a0 100644
--- a/tests/keyspace.rs
+++ b/tests/keyspace.rs
@@ -24,169 +24,171 @@ const ADDR: &'static str = "127.0.0.1:9042";
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn create_keyspace() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let session = new_session(&cluster_config, lb).expect("session should be created");
-
-  let drop_query = "DROP KEYSPACE IF EXISTS create_ks_test";
-  let keyspace_droped = session.query(drop_query).is_ok();
-  assert!(keyspace_droped, "Should drop new keyspace without errors");
-
-  let create_query = "CREATE KEYSPACE IF NOT EXISTS create_ks_test WITH \
-                      replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
-                      AND durable_writes = false";
-  let keyspace_created = session.query(create_query).is_ok();
-  assert!(
-    keyspace_created,
-    "Should create new keyspace without errors"
-  );
-
-  let select_query = "SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'create_ks_test'";
-  let keyspace_selected = session
-    .query(select_query)
-    .expect("select keyspace query")
-    .get_body()
-    .expect("get select keyspace query body")
-    .into_rows()
-    .expect("convert keyspaces results into rows");
-
-  assert_eq!(keyspace_selected.len(), 1);
-  let keyspace = &keyspace_selected[0];
-
-  let keyspace_name: String = keyspace
-    .get_r_by_name("keyspace_name")
-    .expect("keyspace name into rust error");
-  assert_eq!(
-    keyspace_name,
-    "create_ks_test".to_string(),
-    "wrong keyspace name"
-  );
-
-  let durable_writes: bool = keyspace
-    .get_r_by_name("durable_writes")
-    .expect("durable writes into rust error");
-  assert_eq!(durable_writes, false, "wrong durable writes");
-
-  let mut expected_strategy_options: HashMap<String, String> = HashMap::new();
-  expected_strategy_options.insert("replication_factor".to_string(), "1".to_string());
-  expected_strategy_options.insert(
-    "class".to_string(),
-    "org.apache.cassandra.locator.SimpleStrategy".to_string(),
-  );
-  let strategy_options: HashMap<String, String> = keyspace
-    .r_by_name::<Map>("replication")
-    .expect("strategy optioins into rust error")
-    .as_r_rust()
-    .expect("uuid_key_map");
-  assert_eq!(
-    expected_strategy_options, strategy_options,
-    "wrong strategy options"
-  );
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let session = new_session(&cluster_config, lb).expect("session should be created");
+
+    let drop_query = "DROP KEYSPACE IF EXISTS create_ks_test";
+    let keyspace_droped = session.query(drop_query).is_ok();
+    assert!(keyspace_droped, "Should drop new keyspace without errors");
+
+    let create_query = "CREATE KEYSPACE IF NOT EXISTS create_ks_test WITH \
+                        replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
+                        AND durable_writes = false";
+    let keyspace_created = session.query(create_query).is_ok();
+    assert!(
+        keyspace_created,
+        "Should create new keyspace without errors"
+    );
+
+    let select_query =
+        "SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'create_ks_test'";
+    let keyspace_selected = session
+        .query(select_query)
+        .expect("select keyspace query")
+        .get_body()
+        .expect("get select keyspace query body")
+        .into_rows()
+        .expect("convert keyspaces results into rows");
+
+    assert_eq!(keyspace_selected.len(), 1);
+    let keyspace = &keyspace_selected[0];
+
+    let keyspace_name: String = keyspace
+        .get_r_by_name("keyspace_name")
+        .expect("keyspace name into rust error");
+    assert_eq!(
+        keyspace_name,
+        "create_ks_test".to_string(),
+        "wrong keyspace name"
+    );
+
+    let durable_writes: bool = keyspace
+        .get_r_by_name("durable_writes")
+        .expect("durable writes into rust error");
+    assert_eq!(durable_writes, false, "wrong durable writes");
+
+    let mut expected_strategy_options: HashMap<String, String> = HashMap::new();
+    expected_strategy_options.insert("replication_factor".to_string(), "1".to_string());
+    expected_strategy_options.insert(
+        "class".to_string(),
+        "org.apache.cassandra.locator.SimpleStrategy".to_string(),
+    );
+    let strategy_options: HashMap<String, String> = keyspace
+        .r_by_name::<Map>("replication")
+        .expect("strategy optioins into rust error")
+        .as_r_rust()
+        .expect("uuid_key_map");
+    assert_eq!(
+        expected_strategy_options, strategy_options,
+        "wrong strategy options"
+    );
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn alter_keyspace() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let session = new_session(&cluster_config, lb).expect("session should be created");
-
-  let drop_query = "DROP KEYSPACE IF EXISTS alter_ks_test";
-  let keyspace_droped = session.query(drop_query).is_ok();
-  assert!(keyspace_droped, "Should drop new keyspace without errors");
-
-  let create_query = "CREATE KEYSPACE IF NOT EXISTS alter_ks_test WITH \
-                      replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
-                      AND durable_writes = false";
-  let keyspace_created = session.query(create_query).is_ok();
-  assert!(
-    keyspace_created,
-    "Should create new keyspace without errors"
-  );
-
-  let alter_query = "ALTER KEYSPACE alter_ks_test WITH \
-                     replication = {'class': 'SimpleStrategy', 'replication_factor': 3} \
-                     AND durable_writes = false";
-  assert!(
-    session.query(alter_query).is_ok(),
-    "alter should be without errors"
-  );
-
-  let select_query = "SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'alter_ks_test'";
-  let keyspace_selected = session
-    .query(select_query)
-    .expect("select keyspace query")
-    .get_body()
-    .expect("get select keyspace query body")
-    .into_rows()
-    .expect("convert keyspaces results into rows");
-
-  assert_eq!(keyspace_selected.len(), 1);
-  let keyspace = &keyspace_selected[0];
-
-  let strategy_options: HashMap<String, String> = keyspace
-    .r_by_name::<Map>("replication")
-    .expect("strategy optioins into rust error")
-    .as_r_rust()
-    .expect("uuid_key_map");
-
-  assert_eq!(
-    strategy_options
-      .get("replication_factor")
-      .expect("replication_factor unwrap"),
-    &"3".to_string()
-  );
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let session = new_session(&cluster_config, lb).expect("session should be created");
+
+    let drop_query = "DROP KEYSPACE IF EXISTS alter_ks_test";
+    let keyspace_droped = session.query(drop_query).is_ok();
+    assert!(keyspace_droped, "Should drop new keyspace without errors");
+
+    let create_query = "CREATE KEYSPACE IF NOT EXISTS alter_ks_test WITH \
+                        replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
+                        AND durable_writes = false";
+    let keyspace_created = session.query(create_query).is_ok();
+    assert!(
+        keyspace_created,
+        "Should create new keyspace without errors"
+    );
+
+    let alter_query = "ALTER KEYSPACE alter_ks_test WITH \
+                       replication = {'class': 'SimpleStrategy', 'replication_factor': 3} \
+                       AND durable_writes = false";
+    assert!(
+        session.query(alter_query).is_ok(),
+        "alter should be without errors"
+    );
+
+    let select_query =
+        "SELECT * FROM system_schema.keyspaces WHERE keyspace_name = 'alter_ks_test'";
+    let keyspace_selected = session
+        .query(select_query)
+        .expect("select keyspace query")
+        .get_body()
+        .expect("get select keyspace query body")
+        .into_rows()
+        .expect("convert keyspaces results into rows");
+
+    assert_eq!(keyspace_selected.len(), 1);
+    let keyspace = &keyspace_selected[0];
+
+    let strategy_options: HashMap<String, String> = keyspace
+        .r_by_name::<Map>("replication")
+        .expect("strategy optioins into rust error")
+        .as_r_rust()
+        .expect("uuid_key_map");
+
+    assert_eq!(
+        strategy_options
+            .get("replication_factor")
+            .expect("replication_factor unwrap"),
+        &"3".to_string()
+    );
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn use_keyspace() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let session = new_session(&cluster_config, lb).expect("session should be created");
-
-  let create_query = "CREATE KEYSPACE IF NOT EXISTS use_ks_test WITH \
-                      replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
-                      AND durable_writes = false";
-  let keyspace_created = session.query(create_query).is_ok();
-  assert!(
-    keyspace_created,
-    "Should create new keyspace without errors"
-  );
-
-  let use_query = "USE use_ks_test";
-  let keyspace_used = session
-    .query(use_query)
-    .expect("should use selected")
-    .get_body()
-    .expect("should get body")
-    .into_set_keyspace()
-    .expect("set keyspace")
-    .body;
-  assert_eq!(keyspace_used.as_str(), "use_ks_test", "wrong kespace used");
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let session = new_session(&cluster_config, lb).expect("session should be created");
+
+    let create_query = "CREATE KEYSPACE IF NOT EXISTS use_ks_test WITH \
+                        replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
+                        AND durable_writes = false";
+    let keyspace_created = session.query(create_query).is_ok();
+    assert!(
+        keyspace_created,
+        "Should create new keyspace without errors"
+    );
+
+    let use_query = "USE use_ks_test";
+    let keyspace_used = session
+        .query(use_query)
+        .expect("should use selected")
+        .get_body()
+        .expect("should get body")
+        .into_set_keyspace()
+        .expect("set keyspace")
+        .body;
+    assert_eq!(keyspace_used.as_str(), "use_ks_test", "wrong kespace used");
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn drop_keyspace() {
-  let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
-  let cluster_config = ClusterTcpConfig(vec![node]);
-  let lb = RoundRobin::new();
-  let session = new_session(&cluster_config, lb).expect("session should be created");
-
-  let create_query = "CREATE KEYSPACE IF NOT EXISTS drop_ks_test WITH \
-                      replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
-                      AND durable_writes = false";
-  let keyspace_created = session.query(create_query).is_ok();
-  assert!(
-    keyspace_created,
-    "Should create new keyspace without errors"
-  );
-
-  let drop_query = "DROP KEYSPACE drop_ks_test";
-  let keyspace_droped = session.query(drop_query).is_ok();
-  assert!(keyspace_droped, "Should drop new keyspace without errors");
+    let node = NodeTcpConfigBuilder::new("127.0.0.1:9042", NoneAuthenticator {}).build();
+    let cluster_config = ClusterTcpConfig(vec![node]);
+    let lb = RoundRobin::new();
+    let session = new_session(&cluster_config, lb).expect("session should be created");
+
+    let create_query = "CREATE KEYSPACE IF NOT EXISTS drop_ks_test WITH \
+                        replication = {'class': 'SimpleStrategy', 'replication_factor': 1} \
+                        AND durable_writes = false";
+    let keyspace_created = session.query(create_query).is_ok();
+    assert!(
+        keyspace_created,
+        "Should create new keyspace without errors"
+    );
+
+    let drop_query = "DROP KEYSPACE drop_ks_test";
+    let keyspace_droped = session.query(drop_query).is_ok();
+    assert!(keyspace_droped, "Should drop new keyspace without errors");
 }
diff --git a/tests/native_types.rs b/tests/native_types.rs
index 7c116b6..ca3188b 100644
--- a/tests/native_types.rs
+++ b/tests/native_types.rs
@@ -35,357 +35,358 @@ use std::str::FromStr;
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn string() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_string \
-             (my_ascii ascii PRIMARY KEY, my_text text, my_varchar varchar)";
-  let session = setup(cql).expect("setup");
-
-  let my_ascii = "my_ascii";
-  let my_text = "my_text";
-  let my_varchar = "my_varchar";
-  let values = query_values!(my_ascii, my_text, my_varchar);
-
-  let query = "INSERT INTO cdrs_test.test_string \
-               (my_ascii, my_text, my_varchar) VALUES (?, ?, ?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert stings error");
-
-  let cql = "SELECT * FROM cdrs_test.test_string";
-  let rows = session
-    .query(cql)
-    .expect("select strings query error")
-    .get_body()
-    .expect("get body error")
-    .into_rows()
-    .expect("converting into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_ascii_row: String = row.get_r_by_name("my_ascii").expect("my_ascii");
-    let my_text_row: String = row.get_r_by_name("my_text").expect("my_text");
-    let my_varchar_row: String = row.get_r_by_name("my_varchar").expect("my_varchar");
-    assert_eq!(my_ascii_row, my_ascii);
-    assert_eq!(my_text_row, my_text);
-    assert_eq!(my_varchar_row, my_varchar);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_string \
+               (my_ascii ascii PRIMARY KEY, my_text text, my_varchar varchar)";
+    let session = setup(cql).expect("setup");
+
+    let my_ascii = "my_ascii";
+    let my_text = "my_text";
+    let my_varchar = "my_varchar";
+    let values = query_values!(my_ascii, my_text, my_varchar);
+
+    let query = "INSERT INTO cdrs_test.test_string \
+                 (my_ascii, my_text, my_varchar) VALUES (?, ?, ?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert stings error");
+
+    let cql = "SELECT * FROM cdrs_test.test_string";
+    let rows = session
+        .query(cql)
+        .expect("select strings query error")
+        .get_body()
+        .expect("get body error")
+        .into_rows()
+        .expect("converting into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_ascii_row: String = row.get_r_by_name("my_ascii").expect("my_ascii");
+        let my_text_row: String = row.get_r_by_name("my_text").expect("my_text");
+        let my_varchar_row: String = row.get_r_by_name("my_varchar").expect("my_varchar");
+        assert_eq!(my_ascii_row, my_ascii);
+        assert_eq!(my_text_row, my_text);
+        assert_eq!(my_varchar_row, my_varchar);
+    }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn counter() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_counter \
-             (my_bigint bigint PRIMARY KEY, my_counter counter)";
-  let session = setup(cql).expect("setup");
-
-  let my_bigint: i64 = 10_000_000_000_000_000;
-  let my_counter: i64 = 100_000_000;
-  let values = query_values!(my_counter, my_bigint);
-
-  let query = "UPDATE cdrs_test.test_counter SET my_counter = my_counter + ? \
-               WHERE my_bigint = ?";
-  session.query_with_values(query, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_counter";
-  let rows = session
-    .query(cql)
-    .expect("select counter query error")
-    .get_body()
-    .expect("get counter body error")
-    .into_rows()
-    .expect("converting coutner body into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
-    let my_counter_row: i64 = row.get_r_by_name("my_counter").expect("my_counter");
-    assert_eq!(my_bigint_row, my_bigint);
-    assert_eq!(my_counter_row, my_counter);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_counter \
+               (my_bigint bigint PRIMARY KEY, my_counter counter)";
+    let session = setup(cql).expect("setup");
+
+    let my_bigint: i64 = 10_000_000_000_000_000;
+    let my_counter: i64 = 100_000_000;
+    let values = query_values!(my_counter, my_bigint);
+
+    let query = "UPDATE cdrs_test.test_counter SET my_counter = my_counter + ? \
+                 WHERE my_bigint = ?";
+    session.query_with_values(query, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_counter";
+    let rows = session
+        .query(cql)
+        .expect("select counter query error")
+        .get_body()
+        .expect("get counter body error")
+        .into_rows()
+        .expect("converting coutner body into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
+        let my_counter_row: i64 = row.get_r_by_name("my_counter").expect("my_counter");
+        assert_eq!(my_bigint_row, my_bigint);
+        assert_eq!(my_counter_row, my_counter);
+    }
 }
 
 // TODO varint
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn integer() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_integer \
-             (my_bigint bigint PRIMARY KEY, my_int int, my_boolean boolean)";
-  let session = setup(cql).expect("setup");
-
-  let my_bigint: i64 = 10_000_000_000_000_000;
-  let my_int: i32 = 100_000_000;
-  let my_boolean: bool = true;
-  let values = query_values!(my_bigint, my_int, my_boolean);
-
-  let query = "INSERT INTO cdrs_test.test_integer \
-               (my_bigint, my_int, my_boolean) VALUES (?, ?, ?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert integers error");
-
-  let cql = "SELECT * FROM cdrs_test.test_integer";
-  let rows = session
-    .query(cql)
-    .expect("select integers query error")
-    .get_body()
-    .expect("get body with integers error")
-    .into_rows()
-    .expect("converting body with integers into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
-    let my_int_row: i32 = row.get_r_by_name("my_int").expect("my_int");
-    let my_boolean_row: bool = row.get_r_by_name("my_boolean").expect("my_boolean");
-    assert_eq!(my_bigint_row, my_bigint);
-    assert_eq!(my_int_row, my_int);
-    assert_eq!(my_boolean_row, my_boolean);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_integer \
+               (my_bigint bigint PRIMARY KEY, my_int int, my_boolean boolean)";
+    let session = setup(cql).expect("setup");
+
+    let my_bigint: i64 = 10_000_000_000_000_000;
+    let my_int: i32 = 100_000_000;
+    let my_boolean: bool = true;
+    let values = query_values!(my_bigint, my_int, my_boolean);
+
+    let query = "INSERT INTO cdrs_test.test_integer \
+                 (my_bigint, my_int, my_boolean) VALUES (?, ?, ?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert integers error");
+
+    let cql = "SELECT * FROM cdrs_test.test_integer";
+    let rows = session
+        .query(cql)
+        .expect("select integers query error")
+        .get_body()
+        .expect("get body with integers error")
+        .into_rows()
+        .expect("converting body with integers into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
+        let my_int_row: i32 = row.get_r_by_name("my_int").expect("my_int");
+        let my_boolean_row: bool = row.get_r_by_name("my_boolean").expect("my_boolean");
+        assert_eq!(my_bigint_row, my_bigint);
+        assert_eq!(my_int_row, my_int);
+        assert_eq!(my_boolean_row, my_boolean);
+    }
 }
 
 // TODO counter, varint
 #[test]
 #[cfg(all(feature = "v4", feature = "e2e-tests"))]
 fn integer_v4() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_integer_v4 \
-             (my_bigint bigint PRIMARY KEY, my_int int, my_smallint smallint, \
-             my_tinyint tinyint, my_boolean boolean)";
-  let session = setup(cql).expect("setup");
-
-  let my_bigint: i64 = 10_000_000_000_000_000;
-  let my_int: i32 = 100_000_000;
-  let my_smallint: i16 = 10_000;
-  let my_tinyint: i8 = 100;
-  let my_boolean: bool = true;
-  let values = query_values!(my_bigint, my_int, my_smallint, my_tinyint, my_boolean);
-
-  let query = "INSERT INTO cdrs_test.test_integer_v4 \
-               (my_bigint, my_int, my_smallint, my_tinyint, my_boolean) VALUES (?, ?, ?, ?, ?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert integers error");
-
-  let cql = "SELECT * FROM cdrs_test.test_integer_v4";
-  let rows = session
-    .query(cql)
-    .expect("query integers error")
-    .get_body()
-    .expect("get body with integers error")
-    .into_rows()
-    .expect("converting body with integers into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
-    let my_int_row: i32 = row.get_r_by_name("my_int").expect("my_int");
-    let my_smallint_row: i16 = row.get_r_by_name("my_smallint").expect("my_smallint");
-    let my_tinyint_row: i8 = row.get_r_by_name("my_tinyint").expect("my_tinyint");
-    let my_boolean_row: bool = row.get_r_by_name("my_boolean").expect("my_boolean");
-    assert_eq!(my_bigint_row, my_bigint);
-    assert_eq!(my_int_row, my_int);
-    assert_eq!(my_smallint_row, my_smallint);
-    assert_eq!(my_tinyint_row, my_tinyint);
-    assert_eq!(my_boolean_row, my_boolean);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_integer_v4 \
+               (my_bigint bigint PRIMARY KEY, my_int int, my_smallint smallint, \
+               my_tinyint tinyint, my_boolean boolean)";
+    let session = setup(cql).expect("setup");
+
+    let my_bigint: i64 = 10_000_000_000_000_000;
+    let my_int: i32 = 100_000_000;
+    let my_smallint: i16 = 10_000;
+    let my_tinyint: i8 = 100;
+    let my_boolean: bool = true;
+    let values = query_values!(my_bigint, my_int, my_smallint, my_tinyint, my_boolean);
+
+    let query = "INSERT INTO cdrs_test.test_integer_v4 \
+                 (my_bigint, my_int, my_smallint, my_tinyint, my_boolean) VALUES (?, ?, ?, ?, ?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert integers error");
+
+    let cql = "SELECT * FROM cdrs_test.test_integer_v4";
+    let rows = session
+        .query(cql)
+        .expect("query integers error")
+        .get_body()
+        .expect("get body with integers error")
+        .into_rows()
+        .expect("converting body with integers into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_bigint_row: i64 = row.get_r_by_name("my_bigint").expect("my_bigint");
+        let my_int_row: i32 = row.get_r_by_name("my_int").expect("my_int");
+        let my_smallint_row: i16 = row.get_r_by_name("my_smallint").expect("my_smallint");
+        let my_tinyint_row: i8 = row.get_r_by_name("my_tinyint").expect("my_tinyint");
+        let my_boolean_row: bool = row.get_r_by_name("my_boolean").expect("my_boolean");
+        assert_eq!(my_bigint_row, my_bigint);
+        assert_eq!(my_int_row, my_int);
+        assert_eq!(my_smallint_row, my_smallint);
+        assert_eq!(my_tinyint_row, my_tinyint);
+        assert_eq!(my_boolean_row, my_boolean);
+    }
 }
 
 // TODO decimal
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn float() {
-  let cql =
+    let cql =
     "CREATE TABLE IF NOT EXISTS cdrs_test.test_float \
      (my_float float PRIMARY KEY, my_double double, my_decimal_a decimal, my_decimal_b decimal)";
-  let session = setup(cql).expect("setup");
-
-  let my_float: f32 = 123.456;
-  let my_double: f64 = 987.654;
-  let my_decimal_b = std::i64::MAX;
-  let values = query_values!(
-    my_float,
-    my_double,
-    Decimal::new(12001, 2),
-    Decimal::from(my_decimal_b)
-  );
-
-  let query =
+    let session = setup(cql).expect("setup");
+
+    let my_float: f32 = 123.456;
+    let my_double: f64 = 987.654;
+    let my_decimal_b = std::i64::MAX;
+    let values = query_values!(
+        my_float,
+        my_double,
+        Decimal::new(12001, 2),
+        Decimal::from(my_decimal_b)
+    );
+
+    let query =
         "INSERT INTO cdrs_test.test_float (my_float, my_double, my_decimal_a, my_decimal_b) VALUES (?, ?, ?, ?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert floats error");
-
-  let cql = "SELECT * FROM cdrs_test.test_float";
-  let rows = session
-    .query(cql)
-    .expect("query floats error")
-    .get_body()
-    .expect("get body with floats error")
-    .into_rows()
-    .expect("converting body with floats into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_float_row: f32 = row.get_r_by_name("my_float").expect("my_float");
-    let my_double_row: f64 = row.get_r_by_name("my_double").expect("my_double");
-    let my_decimal_row_a: Decimal = row.get_r_by_name("my_decimal_a").expect("my_decimal_a");
-    let my_decimal_row_b: Decimal = row.get_r_by_name("my_decimal_b").expect("my_decimal_b");
-    assert_eq!(my_float_row, my_float);
-    assert_eq!(my_double_row, my_double);
-    assert_eq!(my_decimal_row_a, Decimal::new(12001, 2));
-    assert_eq!(my_decimal_row_b, Decimal::from(my_decimal_b));
-  }
+    session
+        .query_with_values(query, values)
+        .expect("insert floats error");
+
+    let cql = "SELECT * FROM cdrs_test.test_float";
+    let rows = session
+        .query(cql)
+        .expect("query floats error")
+        .get_body()
+        .expect("get body with floats error")
+        .into_rows()
+        .expect("converting body with floats into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_float_row: f32 = row.get_r_by_name("my_float").expect("my_float");
+        let my_double_row: f64 = row.get_r_by_name("my_double").expect("my_double");
+        let my_decimal_row_a: Decimal = row.get_r_by_name("my_decimal_a").expect("my_decimal_a");
+        let my_decimal_row_b: Decimal = row.get_r_by_name("my_decimal_b").expect("my_decimal_b");
+        assert_eq!(my_float_row, my_float);
+        assert_eq!(my_double_row, my_double);
+        assert_eq!(my_decimal_row_a, Decimal::new(12001, 2));
+        assert_eq!(my_decimal_row_b, Decimal::from(my_decimal_b));
+    }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn blob() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_blob \
-             (my_blob blob PRIMARY KEY, my_mapblob map<text, blob>)";
-  let session = setup(cql).expect("setup");
-
-  let my_blob: Blob = vec![0, 1, 2, 4, 8, 16, 32, 64, 128, 255].into();
-  let my_map: HashMap<String, Blob> = [
-    ("a".to_owned(), b"aaaaa".to_vec().into()),
-    ("b".to_owned(), b"bbbbb".to_vec().into()),
-    ("c".to_owned(), b"ccccc".to_vec().into()),
-    ("d".to_owned(), b"ddddd".to_vec().into()),
-  ]
-  .into_iter()
-  .map(|x| x.clone())
-  .collect();
-
-  let val_map: HashMap<String, Bytes> = my_map
-    .clone()
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_blob \
+               (my_blob blob PRIMARY KEY, my_mapblob map<text, blob>)";
+    let session = setup(cql).expect("setup");
+
+    let my_blob: Blob = vec![0, 1, 2, 4, 8, 16, 32, 64, 128, 255].into();
+    let my_map: HashMap<String, Blob> = [
+        ("a".to_owned(), b"aaaaa".to_vec().into()),
+        ("b".to_owned(), b"bbbbb".to_vec().into()),
+        ("c".to_owned(), b"ccccc".to_vec().into()),
+        ("d".to_owned(), b"ddddd".to_vec().into()),
+    ]
     .into_iter()
-    .map(|(k, v)| (k, Bytes::new(v.into_vec())))
+    .map(|x| x.clone())
     .collect();
 
-  let values = query_values!(my_blob.clone(), val_map);
-
-  let query = "INSERT INTO cdrs_test.test_blob (my_blob, my_mapblob) VALUES (?,?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert blob error");
-
-  let cql = "SELECT * FROM cdrs_test.test_blob";
-  let rows = session
-    .query(cql)
-    .expect("query blobs error")
-    .get_body()
-    .expect("get body with blobs error")
-    .into_rows()
-    .expect("converting body with blobs into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_blob_row: Blob = row.get_r_by_name("my_blob").expect("my_blob");
-    assert_eq!(my_blob_row, my_blob);
-    let my_map_row: HashMap<String, Blob> = row
-      .r_by_name::<Map>("my_mapblob")
-      .expect("my_mapblob by name")
-      .as_r_rust()
-      .expect("my_mapblob as r rust");
-    assert_eq!(my_map_row, my_map);
-  }
+    let val_map: HashMap<String, Bytes> = my_map
+        .clone()
+        .into_iter()
+        .map(|(k, v)| (k, Bytes::new(v.into_vec())))
+        .collect();
+
+    let values = query_values!(my_blob.clone(), val_map);
+
+    let query = "INSERT INTO cdrs_test.test_blob (my_blob, my_mapblob) VALUES (?,?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert blob error");
+
+    let cql = "SELECT * FROM cdrs_test.test_blob";
+    let rows = session
+        .query(cql)
+        .expect("query blobs error")
+        .get_body()
+        .expect("get body with blobs error")
+        .into_rows()
+        .expect("converting body with blobs into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_blob_row: Blob = row.get_r_by_name("my_blob").expect("my_blob");
+        assert_eq!(my_blob_row, my_blob);
+        let my_map_row: HashMap<String, Blob> = row
+            .r_by_name::<Map>("my_mapblob")
+            .expect("my_mapblob by name")
+            .as_r_rust()
+            .expect("my_mapblob as r rust");
+        assert_eq!(my_map_row, my_map);
+    }
 }
 
 // TODO timeuuid
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn uuid() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_uuid \
-             (my_uuid uuid PRIMARY KEY)";
-  let session = setup(cql).expect("setup");
-
-  let my_uuid = Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap();
-  let values = query_values!(my_uuid);
-
-  let query = "INSERT INTO cdrs_test.test_uuid (my_uuid) VALUES (?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert UUID error");
-
-  let cql = "SELECT * FROM cdrs_test.test_uuid";
-  let rows = session
-    .query(cql)
-    .expect("query UUID error")
-    .get_body()
-    .expect("get body with UUID error")
-    .into_rows()
-    .expect("convertion body with UUID into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_uuid_row: Uuid = row.get_r_by_name("my_uuid").expect("my_uuid");
-    assert_eq!(my_uuid_row, my_uuid);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_uuid \
+               (my_uuid uuid PRIMARY KEY)";
+    let session = setup(cql).expect("setup");
+
+    let my_uuid = Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap();
+    let values = query_values!(my_uuid);
+
+    let query = "INSERT INTO cdrs_test.test_uuid (my_uuid) VALUES (?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert UUID error");
+
+    let cql = "SELECT * FROM cdrs_test.test_uuid";
+    let rows = session
+        .query(cql)
+        .expect("query UUID error")
+        .get_body()
+        .expect("get body with UUID error")
+        .into_rows()
+        .expect("convertion body with UUID into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_uuid_row: Uuid = row.get_r_by_name("my_uuid").expect("my_uuid");
+        assert_eq!(my_uuid_row, my_uuid);
+    }
 }
 
 // TODO date, time, duration
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn time() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_time \
-             (my_timestamp timestamp PRIMARY KEY)";
-  let session = setup(cql).expect("setup");
-
-  let my_timestamp = time::get_time();
-  let values = query_values!(my_timestamp);
-
-  let query = "INSERT INTO cdrs_test.test_time (my_timestamp) VALUES (?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert timestamp error");
-
-  let cql = "SELECT * FROM cdrs_test.test_time";
-  let rows = session
-    .query(cql)
-    .expect("query with time error")
-    .get_body()
-    .expect("get body with time error")
-    .into_rows()
-    .expect("converting body with time into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_timestamp_row: time::Timespec = row.get_r_by_name("my_timestamp").expect("my_timestamp");
-    assert_eq!(my_timestamp_row.sec, my_timestamp.sec);
-    assert_eq!(
-      my_timestamp_row.nsec / 1_000_000,
-      my_timestamp.nsec / 1_000_000
-    ); // C* `timestamp` has millisecond precision
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_time \
+               (my_timestamp timestamp PRIMARY KEY)";
+    let session = setup(cql).expect("setup");
+
+    let my_timestamp = time::get_time();
+    let values = query_values!(my_timestamp);
+
+    let query = "INSERT INTO cdrs_test.test_time (my_timestamp) VALUES (?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert timestamp error");
+
+    let cql = "SELECT * FROM cdrs_test.test_time";
+    let rows = session
+        .query(cql)
+        .expect("query with time error")
+        .get_body()
+        .expect("get body with time error")
+        .into_rows()
+        .expect("converting body with time into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_timestamp_row: time::Timespec =
+            row.get_r_by_name("my_timestamp").expect("my_timestamp");
+        assert_eq!(my_timestamp_row.sec, my_timestamp.sec);
+        assert_eq!(
+            my_timestamp_row.nsec / 1_000_000,
+            my_timestamp.nsec / 1_000_000
+        ); // C* `timestamp` has millisecond precision
+    }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn inet() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_inet \
-             (my_inet_v4 inet PRIMARY KEY, my_inet_v6 inet)";
-  let session = setup(cql).expect("setup");
-
-  let my_inet_v4 = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
-  let my_inet_v6 = IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
-  let values = query_values!(my_inet_v4.clone(), my_inet_v6.clone());
-
-  let query = "INSERT INTO cdrs_test.test_inet (my_inet_v4, my_inet_v6) VALUES (?, ?)";
-  session
-    .query_with_values(query, values)
-    .expect("insert inet error");
-
-  let query = "SELECT * FROM cdrs_test.test_inet";
-  let rows = session
-    .query(query)
-    .expect("query inet error")
-    .get_body()
-    .expect("get body with inet error")
-    .into_rows()
-    .expect("converting body with inet into rows error");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_inet_v4_row: IpAddr = row.get_r_by_name("my_inet_v4").expect("my_inet_v4");
-    let my_inet_v6_row: IpAddr = row.get_r_by_name("my_inet_v6").expect("my_inet_v6");
-    assert_eq!(my_inet_v4_row, my_inet_v4);
-    assert_eq!(my_inet_v6_row, my_inet_v6);
-  }
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_inet \
+               (my_inet_v4 inet PRIMARY KEY, my_inet_v6 inet)";
+    let session = setup(cql).expect("setup");
+
+    let my_inet_v4 = IpAddr::V4(Ipv4Addr::new(127, 0, 0, 1));
+    let my_inet_v6 = IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
+    let values = query_values!(my_inet_v4.clone(), my_inet_v6.clone());
+
+    let query = "INSERT INTO cdrs_test.test_inet (my_inet_v4, my_inet_v6) VALUES (?, ?)";
+    session
+        .query_with_values(query, values)
+        .expect("insert inet error");
+
+    let query = "SELECT * FROM cdrs_test.test_inet";
+    let rows = session
+        .query(query)
+        .expect("query inet error")
+        .get_body()
+        .expect("get body with inet error")
+        .into_rows()
+        .expect("converting body with inet into rows error");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_inet_v4_row: IpAddr = row.get_r_by_name("my_inet_v4").expect("my_inet_v4");
+        let my_inet_v6_row: IpAddr = row.get_r_by_name("my_inet_v6").expect("my_inet_v6");
+        assert_eq!(my_inet_v4_row, my_inet_v4);
+        assert_eq!(my_inet_v6_row, my_inet_v6);
+    }
 }
diff --git a/tests/tuple_types.rs b/tests/tuple_types.rs
index 3ceed36..cb2dc67 100644
--- a/tests/tuple_types.rs
+++ b/tests/tuple_types.rs
@@ -35,174 +35,175 @@ use std::str::FromStr;
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn simple_tuple() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.simple_tuple \
-             (my_tuple tuple<text, int> PRIMARY KEY)";
-  let session = setup(cql).expect("setup");
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyTuple {
-    pub my_text: String,
-    pub my_int: i32,
-  }
-
-  impl MyTuple {
-    pub fn try_from(tuple: Tuple) -> Result<MyTuple> {
-      let my_text: String = tuple.get_r_by_index(0)?;
-      let my_int: i32 = tuple.get_r_by_index(1)?;
-      Ok(MyTuple {
-        my_text: my_text,
-        my_int: my_int,
-      })
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.simple_tuple \
+               (my_tuple tuple<text, int> PRIMARY KEY)";
+    let session = setup(cql).expect("setup");
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyTuple {
+        pub my_text: String,
+        pub my_int: i32,
     }
-  }
-
-  impl Into<Bytes> for MyTuple {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_text.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      let val_bytes: Bytes = self.my_int.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+
+    impl MyTuple {
+        pub fn try_from(tuple: Tuple) -> Result<MyTuple> {
+            let my_text: String = tuple.get_r_by_index(0)?;
+            let my_int: i32 = tuple.get_r_by_index(1)?;
+            Ok(MyTuple {
+                my_text: my_text,
+                my_int: my_int,
+            })
+        }
+    }
+
+    impl Into<Bytes> for MyTuple {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_text.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            let val_bytes: Bytes = self.my_int.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
+    }
+
+    let my_tuple = MyTuple {
+        my_text: "my_text".to_string(),
+        my_int: 0,
+    };
+    let values = query_values!(my_tuple.clone());
+
+    let cql = "INSERT INTO cdrs_test.simple_tuple \
+               (my_tuple) VALUES (?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.simple_tuple";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_tuple_row: Tuple = row.get_r_by_name("my_tuple").expect("my_tuple");
+        let my_tuple_row = MyTuple::try_from(my_tuple_row).expect("my_tuple as rust");
+        assert_eq!(my_tuple_row, my_tuple);
     }
-  }
-
-  let my_tuple = MyTuple {
-    my_text: "my_text".to_string(),
-    my_int: 0,
-  };
-  let values = query_values!(my_tuple.clone());
-
-  let cql = "INSERT INTO cdrs_test.simple_tuple \
-             (my_tuple) VALUES (?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.simple_tuple";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_tuple_row: Tuple = row.get_r_by_name("my_tuple").expect("my_tuple");
-    let my_tuple_row = MyTuple::try_from(my_tuple_row).expect("my_tuple as rust");
-    assert_eq!(my_tuple_row, my_tuple);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn nested_tuples() {
-  let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_tuples \
-             (my_key int PRIMARY KEY, \
-             my_outer_tuple tuple<uuid, blob, tuple<text, int, timestamp>>)";
-  let session = setup(cql).expect("setup");
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyInnerTuple {
-    pub my_text: String,
-    pub my_int: i32,
-    pub my_timestamp: Timespec,
-  }
-
-  impl MyInnerTuple {
-    pub fn try_from(tuple: Tuple) -> Result<MyInnerTuple> {
-      let my_text: String = tuple.get_r_by_index(0)?;
-      let my_int: i32 = tuple.get_r_by_index(1)?;
-      let my_timestamp: Timespec = tuple.get_r_by_index(2)?;
-      Ok(MyInnerTuple {
-        my_text: my_text,
-        my_int: my_int,
-        my_timestamp: my_timestamp,
-      })
+    let cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_tuples \
+               (my_key int PRIMARY KEY, \
+               my_outer_tuple tuple<uuid, blob, tuple<text, int, timestamp>>)";
+    let session = setup(cql).expect("setup");
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyInnerTuple {
+        pub my_text: String,
+        pub my_int: i32,
+        pub my_timestamp: Timespec,
+    }
+
+    impl MyInnerTuple {
+        pub fn try_from(tuple: Tuple) -> Result<MyInnerTuple> {
+            let my_text: String = tuple.get_r_by_index(0)?;
+            let my_int: i32 = tuple.get_r_by_index(1)?;
+            let my_timestamp: Timespec = tuple.get_r_by_index(2)?;
+            Ok(MyInnerTuple {
+                my_text: my_text,
+                my_int: my_int,
+                my_timestamp: my_timestamp,
+            })
+        }
+    }
+
+    impl Into<Bytes> for MyInnerTuple {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_text.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            let val_bytes: Bytes = self.my_int.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            let val_bytes: Bytes = self.my_timestamp.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
+    }
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyOuterTuple {
+        pub my_uuid: Uuid,
+        pub my_blob: Vec<u8>,
+        pub my_inner_tuple: MyInnerTuple,
+    }
+
+    impl MyOuterTuple {
+        pub fn try_from(tuple: Tuple) -> Result<MyOuterTuple> {
+            let my_uuid: Uuid = tuple.get_r_by_index(0)?;
+            let my_blob: Blob = tuple.get_r_by_index(1)?;
+            let my_inner_tuple: Tuple = tuple.get_r_by_index(2)?;
+            let my_inner_tuple = MyInnerTuple::try_from(my_inner_tuple).expect("from tuple");
+            Ok(MyOuterTuple {
+                my_uuid: my_uuid,
+                my_blob: my_blob.into_vec(),
+                my_inner_tuple: my_inner_tuple,
+            })
+        }
     }
-  }
-
-  impl Into<Bytes> for MyInnerTuple {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_text.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      let val_bytes: Bytes = self.my_int.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      let val_bytes: Bytes = self.my_timestamp.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+
+    impl Into<Bytes> for MyOuterTuple {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_uuid.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            let val_bytes: Bytes = Bytes::new(self.my_blob);
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            let val_bytes: Bytes = self.my_inner_tuple.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
     }
-  }
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyOuterTuple {
-    pub my_uuid: Uuid,
-    pub my_blob: Vec<u8>,
-    pub my_inner_tuple: MyInnerTuple,
-  }
-
-  impl MyOuterTuple {
-    pub fn try_from(tuple: Tuple) -> Result<MyOuterTuple> {
-      let my_uuid: Uuid = tuple.get_r_by_index(0)?;
-      let my_blob: Blob = tuple.get_r_by_index(1)?;
-      let my_inner_tuple: Tuple = tuple.get_r_by_index(2)?;
-      let my_inner_tuple = MyInnerTuple::try_from(my_inner_tuple).expect("from tuple");
-      Ok(MyOuterTuple {
+
+    let my_uuid = Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap();
+    let my_blob: Vec<u8> = vec![0, 1, 2, 4, 8, 16, 32, 64, 128, 255];
+    let my_inner_tuple = MyInnerTuple {
+        my_text: "my_text".to_string(),
+        my_int: 1_000,
+        my_timestamp: Timespec {
+            sec: 1,
+            nsec: 999_000_000,
+        },
+    };
+    let my_outer_tuple = MyOuterTuple {
         my_uuid: my_uuid,
-        my_blob: my_blob.into_vec(),
+        my_blob: my_blob,
         my_inner_tuple: my_inner_tuple,
-      })
-    }
-  }
-
-  impl Into<Bytes> for MyOuterTuple {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_uuid.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      let val_bytes: Bytes = Bytes::new(self.my_blob);
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      let val_bytes: Bytes = self.my_inner_tuple.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+    };
+    let values = query_values!(0i32, my_outer_tuple.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_nested_tuples \
+               (my_key, my_outer_tuple) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_nested_tuples";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_outer_tuple_row: Tuple =
+            row.get_r_by_name("my_outer_tuple").expect("my_outer_tuple");
+        let my_outer_tuple_row = MyOuterTuple::try_from(my_outer_tuple_row).expect("from tuple");
+        assert_eq!(my_outer_tuple_row, my_outer_tuple);
     }
-  }
-
-  let my_uuid = Uuid::from_str("bb16106a-10bc-4a07-baa3-126ffe208c43").unwrap();
-  let my_blob: Vec<u8> = vec![0, 1, 2, 4, 8, 16, 32, 64, 128, 255];
-  let my_inner_tuple = MyInnerTuple {
-    my_text: "my_text".to_string(),
-    my_int: 1_000,
-    my_timestamp: Timespec {
-      sec: 1,
-      nsec: 999_000_000,
-    },
-  };
-  let my_outer_tuple = MyOuterTuple {
-    my_uuid: my_uuid,
-    my_blob: my_blob,
-    my_inner_tuple: my_inner_tuple,
-  };
-  let values = query_values!(0i32, my_outer_tuple.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_nested_tuples \
-             (my_key, my_outer_tuple) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_nested_tuples";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_outer_tuple_row: Tuple = row.get_r_by_name("my_outer_tuple").expect("my_outer_tuple");
-    let my_outer_tuple_row = MyOuterTuple::try_from(my_outer_tuple_row).expect("from tuple");
-    assert_eq!(my_outer_tuple_row, my_outer_tuple);
-  }
 }
diff --git a/tests/user_defined_types.rs b/tests/user_defined_types.rs
index cc612b1..8de4bae 100644
--- a/tests/user_defined_types.rs
+++ b/tests/user_defined_types.rs
@@ -36,226 +36,226 @@ use std::collections::HashMap;
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn simple_udt() {
-  let create_type_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.simple_udt (my_text text)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_simple_udt \
-                          (my_key int PRIMARY KEY, my_udt simple_udt)";
-  let session = setup_multiple(&[create_type_cql, create_table_cql]).expect("setup");
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyUdt {
-    pub my_text: String,
-  }
-
-  impl MyUdt {
-    pub fn try_from(udt: UDT) -> Result<MyUdt> {
-      let my_text: String = udt.get_r_by_name("my_text")?;
-      Ok(MyUdt { my_text: my_text })
+    let create_type_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.simple_udt (my_text text)";
+    let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_simple_udt \
+                            (my_key int PRIMARY KEY, my_udt simple_udt)";
+    let session = setup_multiple(&[create_type_cql, create_table_cql]).expect("setup");
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyUdt {
+        pub my_text: String,
     }
-  }
-
-  impl Into<Bytes> for MyUdt {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_text.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+
+    impl MyUdt {
+        pub fn try_from(udt: UDT) -> Result<MyUdt> {
+            let my_text: String = udt.get_r_by_name("my_text")?;
+            Ok(MyUdt { my_text: my_text })
+        }
+    }
+
+    impl Into<Bytes> for MyUdt {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_text.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
+    }
+
+    let my_udt = MyUdt {
+        my_text: "my_text".to_string(),
+    };
+    let values = query_values!(0i32, my_udt.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_simple_udt \
+               (my_key, my_udt) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_simple_udt";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_udt_row: UDT = row.get_r_by_name("my_udt").expect("my_udt");
+        let my_udt_row = MyUdt::try_from(my_udt_row).expect("from udt");
+        assert_eq!(my_udt_row, my_udt);
     }
-  }
-
-  let my_udt = MyUdt {
-    my_text: "my_text".to_string(),
-  };
-  let values = query_values!(0i32, my_udt.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_simple_udt \
-             (my_key, my_udt) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_simple_udt";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_udt_row: UDT = row.get_r_by_name("my_udt").expect("my_udt");
-    let my_udt_row = MyUdt::try_from(my_udt_row).expect("from udt");
-    assert_eq!(my_udt_row, my_udt);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn nested_udt() {
-  let create_type1_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_inner_udt (my_text text)";
-  let create_type2_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_outer_udt \
-                          (my_inner_udt frozen<nested_inner_udt>)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_udt \
-                          (my_key int PRIMARY KEY, my_outer_udt nested_outer_udt)";
-  let session =
-    setup_multiple(&[create_type1_cql, create_type2_cql, create_table_cql]).expect("setup");
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyInnerUdt {
-    pub my_text: String,
-  }
-
-  impl MyInnerUdt {
-    pub fn try_from(udt: UDT) -> Result<MyInnerUdt> {
-      let my_text: String = udt.get_r_by_name("my_text")?;
-      Ok(MyInnerUdt { my_text: my_text })
+    let create_type1_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_inner_udt (my_text text)";
+    let create_type2_cql = "CREATE TYPE IF NOT EXISTS cdrs_test.nested_outer_udt \
+                            (my_inner_udt frozen<nested_inner_udt>)";
+    let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_nested_udt \
+                            (my_key int PRIMARY KEY, my_outer_udt nested_outer_udt)";
+    let session =
+        setup_multiple(&[create_type1_cql, create_type2_cql, create_table_cql]).expect("setup");
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyInnerUdt {
+        pub my_text: String,
     }
-  }
-
-  impl Into<Bytes> for MyInnerUdt {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_text.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+
+    impl MyInnerUdt {
+        pub fn try_from(udt: UDT) -> Result<MyInnerUdt> {
+            let my_text: String = udt.get_r_by_name("my_text")?;
+            Ok(MyInnerUdt { my_text: my_text })
+        }
     }
-  }
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyOuterUdt {
-    pub my_inner_udt: MyInnerUdt,
-  }
-
-  impl MyOuterUdt {
-    pub fn try_from(udt: UDT) -> Result<MyOuterUdt> {
-      let my_inner_udt: UDT = udt.get_r_by_name("my_inner_udt")?;
-      let my_inner_udt = MyInnerUdt::try_from(my_inner_udt).expect("from udt");
-      Ok(MyOuterUdt {
-        my_inner_udt: my_inner_udt,
-      })
+
+    impl Into<Bytes> for MyInnerUdt {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_text.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
+    }
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyOuterUdt {
+        pub my_inner_udt: MyInnerUdt,
+    }
+
+    impl MyOuterUdt {
+        pub fn try_from(udt: UDT) -> Result<MyOuterUdt> {
+            let my_inner_udt: UDT = udt.get_r_by_name("my_inner_udt")?;
+            let my_inner_udt = MyInnerUdt::try_from(my_inner_udt).expect("from udt");
+            Ok(MyOuterUdt {
+                my_inner_udt: my_inner_udt,
+            })
+        }
+    }
+
+    impl Into<Bytes> for MyOuterUdt {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_inner_udt.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
     }
-  }
-
-  impl Into<Bytes> for MyOuterUdt {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_inner_udt.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+
+    let my_inner_udt = MyInnerUdt {
+        my_text: "my_text".to_string(),
+    };
+    let my_outer_udt = MyOuterUdt {
+        my_inner_udt: my_inner_udt,
+    };
+    let values = query_values!(0i32, my_outer_udt.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_nested_udt \
+               (my_key, my_outer_udt) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "SELECT * FROM cdrs_test.test_nested_udt";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_outer_udt_row: UDT = row.get_r_by_name("my_outer_udt").expect("my_outer_udt");
+        let my_outer_udt_row = MyOuterUdt::try_from(my_outer_udt_row).expect("from udt");
+        assert_eq!(my_outer_udt_row, my_outer_udt);
     }
-  }
-
-  let my_inner_udt = MyInnerUdt {
-    my_text: "my_text".to_string(),
-  };
-  let my_outer_udt = MyOuterUdt {
-    my_inner_udt: my_inner_udt,
-  };
-  let values = query_values!(0i32, my_outer_udt.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_nested_udt \
-             (my_key, my_outer_udt) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "SELECT * FROM cdrs_test.test_nested_udt";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_outer_udt_row: UDT = row.get_r_by_name("my_outer_udt").expect("my_outer_udt");
-    let my_outer_udt_row = MyOuterUdt::try_from(my_outer_udt_row).expect("from udt");
-    assert_eq!(my_outer_udt_row, my_outer_udt);
-  }
 }
 
 #[test]
 #[cfg(feature = "e2e-tests")]
 fn alter_udt_add() {
-  let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.test_alter_udt_add";
-  let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.alter_udt_add_udt";
-  let create_type_cql = "CREATE TYPE cdrs_test.alter_udt_add_udt (my_text text)";
-  let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_alter_udt_add \
-                          (my_key int PRIMARY KEY, my_map frozen<map<text, alter_udt_add_udt>>)";
-  let session = setup_multiple(&[
-    drop_table_cql,
-    drop_type_cql,
-    create_type_cql,
-    create_table_cql,
-  ])
-  .expect("setup");
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyUdtA {
-    pub my_text: String,
-  }
-
-  impl Into<Bytes> for MyUdtA {
-    fn into(self) -> Bytes {
-      let mut bytes = Vec::new();
-      let val_bytes: Bytes = self.my_text.into();
-      bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
-      Bytes::new(bytes)
+    let drop_table_cql = "DROP TABLE IF EXISTS cdrs_test.test_alter_udt_add";
+    let drop_type_cql = "DROP TYPE IF EXISTS cdrs_test.alter_udt_add_udt";
+    let create_type_cql = "CREATE TYPE cdrs_test.alter_udt_add_udt (my_text text)";
+    let create_table_cql = "CREATE TABLE IF NOT EXISTS cdrs_test.test_alter_udt_add \
+                            (my_key int PRIMARY KEY, my_map frozen<map<text, alter_udt_add_udt>>)";
+    let session = setup_multiple(&[
+        drop_table_cql,
+        drop_type_cql,
+        create_type_cql,
+        create_table_cql,
+    ])
+    .expect("setup");
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyUdtA {
+        pub my_text: String,
     }
-  }
-
-  #[derive(Debug, Clone, PartialEq)]
-  struct MyUdtB {
-    pub my_text: String,
-    pub my_timestamp: Option<Timespec>,
-  }
-
-  impl MyUdtB {
-    pub fn try_from(udt: UDT) -> Result<MyUdtB> {
-      let my_text: String = udt.get_r_by_name("my_text")?;
-      let my_timestamp: Option<Timespec> = udt.get_by_name("my_timestamp")?;
-      Ok(MyUdtB {
-        my_text: my_text,
-        my_timestamp: my_timestamp,
-      })
+
+    impl Into<Bytes> for MyUdtA {
+        fn into(self) -> Bytes {
+            let mut bytes = Vec::new();
+            let val_bytes: Bytes = self.my_text.into();
+            bytes.extend_from_slice(Value::new_normal(val_bytes).into_cbytes().as_slice());
+            Bytes::new(bytes)
+        }
     }
-  }
-
-  let my_udt_a = MyUdtA {
-    my_text: "my_text".to_string(),
-  };
-  let my_map_a = hashmap! { "1" => my_udt_a.clone() };
-  let values = query_values!(0i32, my_map_a.clone());
-
-  let cql = "INSERT INTO cdrs_test.test_alter_udt_add \
-             (my_key, my_map) VALUES (?, ?)";
-  session.query_with_values(cql, values).expect("insert");
-
-  let cql = "ALTER TYPE cdrs_test.alter_udt_add_udt ADD my_timestamp timestamp";
-  session.query(cql).expect("alter type");
-
-  let my_udt_b = MyUdtB {
-    my_text: my_udt_a.my_text,
-    my_timestamp: None,
-  };
-
-  let cql = "SELECT * FROM cdrs_test.test_alter_udt_add";
-  let rows = session
-    .query(cql)
-    .expect("query")
-    .get_body()
-    .expect("get body")
-    .into_rows()
-    .expect("into rows");
-
-  assert_eq!(rows.len(), 1);
-  for row in rows {
-    let my_map_row: Map = row.get_r_by_name("my_map").expect("my_map");
-    let my_map_row: HashMap<String, UDT> = my_map_row.as_r_rust().expect("my_map as rust");
-
-    for (key, my_udt_row) in my_map_row {
-      let my_udt_row = MyUdtB::try_from(my_udt_row).expect("from udt");
-      assert_eq!(key, "1");
-      assert_eq!(my_udt_row, my_udt_b);
+
+    #[derive(Debug, Clone, PartialEq)]
+    struct MyUdtB {
+        pub my_text: String,
+        pub my_timestamp: Option<Timespec>,
+    }
+
+    impl MyUdtB {
+        pub fn try_from(udt: UDT) -> Result<MyUdtB> {
+            let my_text: String = udt.get_r_by_name("my_text")?;
+            let my_timestamp: Option<Timespec> = udt.get_by_name("my_timestamp")?;
+            Ok(MyUdtB {
+                my_text: my_text,
+                my_timestamp: my_timestamp,
+            })
+        }
+    }
+
+    let my_udt_a = MyUdtA {
+        my_text: "my_text".to_string(),
+    };
+    let my_map_a = hashmap! { "1" => my_udt_a.clone() };
+    let values = query_values!(0i32, my_map_a.clone());
+
+    let cql = "INSERT INTO cdrs_test.test_alter_udt_add \
+               (my_key, my_map) VALUES (?, ?)";
+    session.query_with_values(cql, values).expect("insert");
+
+    let cql = "ALTER TYPE cdrs_test.alter_udt_add_udt ADD my_timestamp timestamp";
+    session.query(cql).expect("alter type");
+
+    let my_udt_b = MyUdtB {
+        my_text: my_udt_a.my_text,
+        my_timestamp: None,
+    };
+
+    let cql = "SELECT * FROM cdrs_test.test_alter_udt_add";
+    let rows = session
+        .query(cql)
+        .expect("query")
+        .get_body()
+        .expect("get body")
+        .into_rows()
+        .expect("into rows");
+
+    assert_eq!(rows.len(), 1);
+    for row in rows {
+        let my_map_row: Map = row.get_r_by_name("my_map").expect("my_map");
+        let my_map_row: HashMap<String, UDT> = my_map_row.as_r_rust().expect("my_map as rust");
+
+        for (key, my_udt_row) in my_map_row {
+            let my_udt_row = MyUdtB::try_from(my_udt_row).expect("from udt");
+            assert_eq!(key, "1");
+            assert_eq!(my_udt_row, my_udt_b);
+        }
     }
-  }
 }