Skip to content

Commit

Permalink
fix PR comments. removing unnecessary to_string on fbs msg building
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbatyk committed Oct 10, 2024
1 parent 7322695 commit 74198ca
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions crates/core/src/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl ContractChange<'_> {
let transaction = buf.create_string(transaction.as_str());
let contract = buf.create_string(contract.as_str());
let requester = buf.create_string(requester.as_str());
let target = buf.create_string(target.to_string().as_str());
let target = buf.create_string(target.as_str());
let put_success = topology::PutSuccess::create(
&mut buf,
&topology::PutSuccessArgs {
Expand Down Expand Up @@ -230,10 +230,10 @@ impl PeerChange<'_> {
connections: impl Iterator<Item = &'a (String, f64)>,
) -> Vec<u8> {
let mut buf = flatbuffers::FlatBufferBuilder::new();
let to = buf.create_vector(&to.to_string().as_bytes());
let to = buf.create_vector(to.as_bytes());
let connections = connections
.map(|(from, from_location)| {
let from = Some(buf.create_vector(&from.to_string().as_bytes()));
let from = Some(buf.create_vector(from.as_bytes()));
topology::AddedConnection::create(
&mut buf,
&topology::AddedConnectionArgs {
Expand Down Expand Up @@ -265,8 +265,8 @@ impl PeerChange<'_> {
(to, to_location): (String, f64),
) -> Vec<u8> {
let mut buf = flatbuffers::FlatBufferBuilder::new();
let from = buf.create_vector(&from.to_string().as_bytes());
let to = buf.create_vector(&to.to_string().as_bytes());
let from = buf.create_vector(from.as_bytes());
let to = buf.create_vector(to.as_bytes());
let transaction = transaction.map(|t| buf.create_string(t.as_ref()));
let add_conn = topology::AddedConnection::create(
&mut buf,
Expand Down

0 comments on commit 74198ca

Please sign in to comment.