mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-04-28 09:37:33 +00:00
rust: Update to latest standards
Updating to Rust 2021 is a no-op (but worth doing for future), I've also taken this opportunity to use the latest bitflags crate. Signed-off-by: Christine Caulfield <ccaulfie@redhat.com> Reviewed-by: Jan Friesse <jfriesse@redhat.com>
This commit is contained in:
parent
14a5e6f361
commit
4e683699b9
@ -13,4 +13,4 @@ keywords = ["cluster", "high-availability"]
|
||||
[dependencies]
|
||||
lazy_static = "1.4.0"
|
||||
num_enum = "0.5.4"
|
||||
bitflags = "1.3.2"
|
||||
bitflags = "2.6.0"
|
||||
|
@ -716,7 +716,7 @@ extern "C" fn rust_notify_fn(
|
||||
(cb)(
|
||||
r_cmap_handle,
|
||||
h,
|
||||
TrackType { bits: event },
|
||||
TrackType::from_bits(event).unwrap_or(TrackType::empty()),
|
||||
&r_keyname,
|
||||
&r_old,
|
||||
&r_new,
|
||||
@ -757,7 +757,7 @@ pub fn track_add(
|
||||
ffi::cmap_track_add(
|
||||
handle.cmap_handle,
|
||||
c_name.as_ptr(),
|
||||
track_type.bits,
|
||||
track_type.bits(),
|
||||
Some(rust_notify_fn),
|
||||
user_data as *mut c_void,
|
||||
&mut c_trackhandle,
|
||||
|
@ -302,7 +302,7 @@ pub fn get_info(handle: &Handle, nodeid: NodeId) -> Result<NodeInfo> {
|
||||
node_expected_votes: c_info.node_expected_votes,
|
||||
highest_expected: c_info.highest_expected,
|
||||
quorum: c_info.quorum,
|
||||
flags: NodeInfoFlags { bits: c_info.flags },
|
||||
flags: NodeInfoFlags::from_bits(c_info.flags).unwrap_or(NodeInfoFlags::empty()),
|
||||
qdevice_votes: c_info.qdevice_votes,
|
||||
qdevice_name: string_from_bytes(
|
||||
c_info.qdevice_name.as_ptr(),
|
||||
|
Loading…
Reference in New Issue
Block a user