feat(tvix/nix-compat/wire): have write_bytes accept AsRef<[u8]> payloads
This includes String, &str etc. An example testcase with &str is provided. Change-Id: I900186d6ceb52f52bd41ef4596524c1f5b52470b Reviewed-on: https://cl.tvl.fyi/c/depot/+/11376 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: picnoir picnoir <picnoir@alternativebit.fr>
This commit is contained in:
parent
acee489866
commit
71a3855f09
2 changed files with 21 additions and 5 deletions
|
@ -165,7 +165,7 @@ where
|
|||
// good idea.
|
||||
debug!("write version");
|
||||
// Plain str padded to 64 bits.
|
||||
bytes::write_bytes(&mut conn, "2.3.17".as_bytes()).await?;
|
||||
bytes::write_bytes(&mut conn, "2.3.17").await?;
|
||||
conn.flush().await?;
|
||||
}
|
||||
if protocol_minor >= 35 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue