mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
feat(protos): use Bytes for protobuf bytes type fields.
This commit is contained in:
+2
-1
@@ -28,4 +28,5 @@ tower.workspace = true
|
||||
url.workspace = true
|
||||
madmin.workspace =true
|
||||
common.workspace = true
|
||||
rustfs-filemeta.workspace = true
|
||||
rustfs-filemeta.workspace = true
|
||||
bytes.workspace = true
|
||||
|
||||
@@ -43,7 +43,7 @@ async fn ping() -> Result<(), Box<dyn Error>> {
|
||||
// Construct PingRequest
|
||||
let request = Request::new(PingRequest {
|
||||
version: 1,
|
||||
body: finished_data.to_vec(),
|
||||
body: bytes::Bytes::copy_from_slice(finished_data),
|
||||
});
|
||||
|
||||
// Send request and get response
|
||||
@@ -114,7 +114,7 @@ async fn walk_dir() -> Result<(), Box<dyn Error>> {
|
||||
let mut client = node_service_time_out_client(&CLUSTER_ADDR.to_string()).await?;
|
||||
let request = Request::new(WalkDirRequest {
|
||||
disk: "/home/dandan/code/rust/s3-rustfs/target/debug/data".to_string(),
|
||||
walk_dir_options: buf,
|
||||
walk_dir_options: buf.into(),
|
||||
});
|
||||
let mut response = client.walk_dir(request).await?.into_inner();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user