Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
amigin committed Jan 9, 2024
1 parent fd6d0d1 commit 26e3a2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions my-no-sql-tcp-shared/src/common_deserializes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ pub async fn read_pascal_string(
Ok(String::from_utf8(result)?)
}

pub async fn read_list_of_pascal_strings(
reader: &mut impl SocketReader,
pub async fn read_list_of_pascal_strings<TSocketReader: SocketReader + Send + Sync + 'static>(
reader: &mut TSocketReader,
) -> Result<Vec<String>, ReadingTcpContractFail> {
let amount = reader.read_i32().await? as usize;

Expand All @@ -28,8 +28,8 @@ pub async fn read_list_of_pascal_strings(
Ok(result)
}

pub async fn read_date_time_opt(
reader: &mut impl SocketReader,
pub async fn read_date_time_opt<TSocketReader: SocketReader + Send + Sync + 'static>(
reader: &mut TSocketReader,
) -> Result<Option<DateTimeAsMicroseconds>, ReadingTcpContractFail> {
let unix_microseconds = reader.read_i64().await?;

Expand Down
2 changes: 1 addition & 1 deletion my-no-sql-tcp-shared/src/tcp_contracts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl MyNoSqlTcpContract {
}
}

pub async fn deserialize<TSocketReader: SocketReader>(
pub async fn deserialize<TSocketReader: SocketReader + Send + Sync + 'static>(
socket_reader: &mut TSocketReader,
) -> Result<Self, ReadingTcpContractFail> {
let packet_no = socket_reader.read_byte().await?;
Expand Down

0 comments on commit 26e3a2a

Please sign in to comment.