From 8108b26af58564a044c9da8330a1f274a87e33cf Mon Sep 17 00:00:00 2001 From: Yuriy Dupyn <2153100+omedusyo@users.noreply.github.com> Date: Sun, 28 Jan 2024 19:18:43 +0100 Subject: [PATCH] Renaming --- minisql/src/internals/row.rs | 6 +++--- server/src/proto_wrapper.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/minisql/src/internals/row.rs b/minisql/src/internals/row.rs index f8a0ea8..504828a 100644 --- a/minisql/src/internals/row.rs +++ b/minisql/src/internals/row.rs @@ -41,15 +41,15 @@ impl FromIterator for Row { impl Row { pub fn new() -> Self { - Row(vec![]) + Self(vec![]) } pub fn new_from_insertion_values(insertion_values: InsertionValues) -> Self { - Row(insertion_values) + Self(insertion_values) } pub fn with_number_of_columns(number_of_columns: usize) -> Self { - Row(Vec::with_capacity(number_of_columns)) + Self(Vec::with_capacity(number_of_columns)) } pub fn push(&mut self, value: Value) { diff --git a/server/src/proto_wrapper.rs b/server/src/proto_wrapper.rs index 79cedbd..48ec749 100644 --- a/server/src/proto_wrapper.rs +++ b/server/src/proto_wrapper.rs @@ -84,11 +84,11 @@ impl ServerProto for W where W: BackendProtoWriter + Send { } } -fn value_to_column_description(schema: &TableSchema, value: &Value, index: Column) -> anyhow::Result { - let name = schema.column_name_from_column(index); +fn value_to_column_description(schema: &TableSchema, value: &Value, column: Column) -> anyhow::Result { + let name = schema.column_name_from_column(column); let table_oid = schema.table_name().as_bytes().as_ptr() as i32; - let column_index = index.try_into()?; + let column_index = column.try_into()?; let type_oid = value.type_oid(); let type_size = value.type_size();