From 104f7d87ccc358d48f772969da708b9eba1958bc Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Thu, 4 Jul 2019 10:31:08 +0000 Subject: Mark deprecated functions using the deprecated attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit nitrokey-sys currently contains two deprecated functions: `NK_status` and `NK_totp_get_time`. This patch adds Rust’s `deprecated` attribute to the functions. --- CHANGELOG.md | 1 + src/ffi.rs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c5bf152..feca334 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Unreleased +- Mark deprecated functions using the `deprecated` attribute. - Update to libnitrokey 3.5, causing all following changes. - New constant `NK_PWS_SLOT_COUNT`. - New structures: diff --git a/src/ffi.rs b/src/ffi.rs index d003cf1..a01eae8 100644 --- a/src/ffi.rs +++ b/src/ffi.rs @@ -759,6 +759,7 @@ extern "C" { /// deprecated in favor of NK_get_status_as_string. /// @return string representation of the status or an empty string /// if the command failed + #[deprecated(since = "3.5.0", note="use `NK_get_status_as_string` instead")] pub fn NK_status() -> *mut ::std::os::raw::c_char; } extern "C" { @@ -1013,6 +1014,7 @@ extern "C" { pub fn NK_totp_set_time_soft(time: u64) -> ::std::os::raw::c_int; } extern "C" { + #[deprecated(since = "3.4.0", note="use `NK_totp_set_time_soft` instead")] pub fn NK_totp_get_time() -> ::std::os::raw::c_int; } extern "C" { -- cgit v1.2.1