From 1ce08a62a968d90629749b1890dd62027937b18a Mon Sep 17 00:00:00 2001 From: Travis LaDuke Date: Thu, 6 Jul 2023 12:13:00 -0700 Subject: [PATCH] zeroidc cargo warnings (#2029) * fix unused struct member cargo warning * fix unused import cargo warning * fix unused return value cargo warning --------- Co-authored-by: Grant Limberg --- zeroidc/src/ext.rs | 2 +- zeroidc/src/lib.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/zeroidc/src/ext.rs b/zeroidc/src/ext.rs index d87724a78..fd1e2e96b 100644 --- a/zeroidc/src/ext.rs +++ b/zeroidc/src/ext.rs @@ -89,7 +89,7 @@ pub extern "C" fn zeroidc_delete(ptr: *mut ZeroIDC) { idc.stop(); unsafe { - Box::from_raw(ptr); + let _ = Box::from_raw(ptr); } } diff --git a/zeroidc/src/lib.rs b/zeroidc/src/lib.rs index 21319481f..0c63cb946 100644 --- a/zeroidc/src/lib.rs +++ b/zeroidc/src/lib.rs @@ -35,6 +35,7 @@ use std::str::from_utf8; use std::sync::{Arc, Mutex}; use std::thread::{sleep, spawn, JoinHandle}; use std::time::{Duration, SystemTime, UNIX_EPOCH}; +#[cfg(debug_assertions)] use time::{format_description, OffsetDateTime}; use url::Url; @@ -59,7 +60,6 @@ pub struct ZeroIDC { ))] struct Inner { running: bool, - issuer: String, auth_endpoint: String, provider: String, oidc_thread: Option>, @@ -123,7 +123,6 @@ impl ZeroIDC { let idc = ZeroIDC { inner: Arc::new(Mutex::new(Inner { running: false, - issuer: issuer.to_string(), provider: provider.to_string(), auth_endpoint: auth_ep.to_string(), oidc_thread: None,