Skip to content

Commit

Permalink
cr fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zealchen committed Aug 8, 2024
1 parent 69672c4 commit 8c9ed4b
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/remote_engine_client/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ async fn write_pb_internal(
msg: "Failed to write to remote engine",
});

let result = result.and_then(|response| {
result.and_then(|response| {
let response = response.into_inner();
if let Some(header) = &response.header
&& !status_code::is_ok(header.code)
Expand All @@ -774,8 +774,7 @@ async fn write_pb_internal(
} else {
Ok(response.affected_rows as usize)
}
});
result
})
}

async fn write_fb_internal(
Expand All @@ -798,7 +797,7 @@ async fn write_fb_internal(
msg: "Failed to write to remote engine",
});

let result = result.and_then(|response| {
result.and_then(|response| {
let fb_response = response.into_inner();
let response = fb_response.deserialize::<WriteResponse>().unwrap();
if let Some(header) = &response.header()
Expand All @@ -814,6 +813,5 @@ async fn write_fb_internal(
} else {
Ok(response.affected_rows() as usize)
}
});
result
})
}

0 comments on commit 8c9ed4b

Please sign in to comment.