Skip to content

Commit 66688a3

Browse files
committed
cargo fmt updated/new rust files
1 parent b63cbcc commit 66688a3

File tree

3 files changed

+280
-177
lines changed

3 files changed

+280
-177
lines changed

src/bindings/rust/src/lib.rs

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,43 +41,42 @@ mod bindings {
4141

4242
// Re-export types from the included bindings
4343
use bindings::{
44-
nixl_capi_create_agent, nixl_capi_create_backend, nixl_capi_create_notif_map,
45-
nixl_capi_create_opt_args, nixl_capi_create_reg_dlist, nixl_capi_create_xfer_dlist,
44+
nixl_capi_agent_make_connection, nixl_capi_create_agent, nixl_capi_create_backend,
45+
nixl_capi_create_notif_map, nixl_capi_create_opt_args, nixl_capi_create_params,
46+
nixl_capi_create_query_resp_list, nixl_capi_create_reg_dlist, nixl_capi_create_xfer_dlist,
4647
nixl_capi_deregister_mem, nixl_capi_destroy_agent, nixl_capi_destroy_backend,
4748
nixl_capi_destroy_mem_list, nixl_capi_destroy_notif_map, nixl_capi_destroy_opt_args,
48-
nixl_capi_destroy_params, nixl_capi_destroy_reg_dlist, nixl_capi_destroy_string_list,
49-
nixl_capi_destroy_xfer_dlist, nixl_capi_get_available_plugins, nixl_capi_get_backend_params,
50-
nixl_capi_get_local_md, nixl_capi_get_notifs, nixl_capi_get_plugin_params,
51-
nixl_capi_get_xfer_status, nixl_capi_invalidate_remote_md, nixl_capi_load_remote_md,
49+
nixl_capi_destroy_params, nixl_capi_destroy_query_resp_list, nixl_capi_destroy_reg_dlist,
50+
nixl_capi_destroy_string_list, nixl_capi_destroy_xfer_dlist, nixl_capi_estimate_xfer_cost,
51+
nixl_capi_gen_notif, nixl_capi_get_available_plugins, nixl_capi_get_backend_params,
52+
nixl_capi_get_local_md, nixl_capi_get_local_partial_md, nixl_capi_get_notifs,
53+
nixl_capi_get_plugin_params, nixl_capi_get_xfer_status, nixl_capi_get_xfer_telemetry,
54+
nixl_capi_invalidate_remote_md, nixl_capi_load_remote_md, nixl_capi_make_xfer_req,
5255
nixl_capi_mem_list_get, nixl_capi_mem_list_is_empty, nixl_capi_mem_list_size,
5356
nixl_capi_mem_type_t, nixl_capi_mem_type_to_string, nixl_capi_notif_map_clear,
5457
nixl_capi_notif_map_get_agent_at, nixl_capi_notif_map_get_notif,
5558
nixl_capi_notif_map_get_notifs_size, nixl_capi_notif_map_size, nixl_capi_opt_args_add_backend,
5659
nixl_capi_opt_args_get_has_notif, nixl_capi_opt_args_get_notif_msg,
5760
nixl_capi_opt_args_get_skip_desc_merge, nixl_capi_opt_args_set_has_notif,
58-
nixl_capi_opt_args_set_notif_msg, nixl_capi_opt_args_set_skip_desc_merge,
59-
nixl_capi_create_params, nixl_capi_params_add, nixl_capi_params_create_iterator,
61+
nixl_capi_opt_args_set_ip_addr, nixl_capi_opt_args_set_notif_msg, nixl_capi_opt_args_set_port,
62+
nixl_capi_opt_args_set_skip_desc_merge, nixl_capi_params_add, nixl_capi_params_create_iterator,
6063
nixl_capi_params_destroy_iterator, nixl_capi_params_is_empty, nixl_capi_params_iterator_next,
61-
nixl_capi_post_xfer_req, nixl_capi_reg_dlist_add_desc, nixl_capi_reg_dlist_clear,
62-
nixl_capi_reg_dlist_len, nixl_capi_reg_dlist_resize, nixl_capi_register_mem,
63-
nixl_capi_string_list_get, nixl_capi_string_list_size, nixl_capi_xfer_dlist_add_desc, nixl_capi_xfer_dlist_clear,
64-
nixl_capi_agent_make_connection,
65-
nixl_capi_reg_dlist_print, nixl_capi_xfer_dlist_print, nixl_capi_gen_notif, nixl_capi_estimate_xfer_cost,
66-
nixl_capi_query_mem, nixl_capi_create_query_resp_list, nixl_capi_destroy_query_resp_list,
67-
nixl_capi_query_resp_list_size, nixl_capi_query_resp_list_has_value,
68-
nixl_capi_query_resp_list_get_params, nixl_capi_prep_xfer_dlist, nixl_capi_release_xfer_dlist_handle,
69-
nixl_capi_make_xfer_req, nixl_capi_get_local_partial_md,
70-
nixl_capi_send_local_partial_md, nixl_capi_query_xfer_backend, nixl_capi_opt_args_set_ip_addr,
71-
nixl_capi_opt_args_set_port, nixl_capi_get_xfer_telemetry
64+
nixl_capi_post_xfer_req, nixl_capi_prep_xfer_dlist, nixl_capi_query_mem,
65+
nixl_capi_query_resp_list_get_params, nixl_capi_query_resp_list_has_value,
66+
nixl_capi_query_resp_list_size, nixl_capi_query_xfer_backend, nixl_capi_reg_dlist_add_desc,
67+
nixl_capi_reg_dlist_clear, nixl_capi_reg_dlist_print, nixl_capi_register_mem,
68+
nixl_capi_release_xfer_dlist_handle, nixl_capi_send_local_partial_md,
69+
nixl_capi_string_list_get, nixl_capi_string_list_size, nixl_capi_xfer_dlist_add_desc,
70+
nixl_capi_xfer_dlist_clear, nixl_capi_xfer_dlist_print,
7271
};
7372

7473
// Re-export status codes
7574
pub use bindings::{
7675
nixl_capi_status_t_NIXL_CAPI_ERROR_BACKEND as NIXL_CAPI_ERROR_BACKEND,
7776
nixl_capi_status_t_NIXL_CAPI_ERROR_INVALID_PARAM as NIXL_CAPI_ERROR_INVALID_PARAM,
77+
nixl_capi_status_t_NIXL_CAPI_ERROR_NO_TELEMETRY as NIXL_CAPI_ERROR_NO_TELEMETRY,
7878
nixl_capi_status_t_NIXL_CAPI_IN_PROG as NIXL_CAPI_IN_PROG,
7979
nixl_capi_status_t_NIXL_CAPI_SUCCESS as NIXL_CAPI_SUCCESS,
80-
nixl_capi_status_t_NIXL_CAPI_ERROR_NO_TELEMETRY as NIXL_CAPI_ERROR_NO_TELEMETRY
8180
};
8281

8382
mod agent;

src/bindings/rust/src/utils/params.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,8 @@ impl Params {
151151
let c_key = CString::new(key)?;
152152
let c_value = CString::new(value)?;
153153

154-
let status = unsafe {
155-
nixl_capi_params_add(self.inner.as_ptr(), c_key.as_ptr(), c_value.as_ptr())
156-
};
154+
let status =
155+
unsafe { nixl_capi_params_add(self.inner.as_ptr(), c_key.as_ptr(), c_value.as_ptr()) };
157156

158157
match status {
159158
0 => Ok(()),

0 commit comments

Comments
 (0)