mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 08:56:58 -06:00
Merge branch 'blackbird-fix-warnings' into 'main'
This commit is contained in:
commit
ff56634667
@ -10,6 +10,7 @@ pub struct RPCOperationValueChanged {
|
||||
}
|
||||
|
||||
impl RPCOperationValueChanged {
|
||||
#[allow(dead_code)]
|
||||
pub fn new(
|
||||
key: TypedKey,
|
||||
subkeys: ValueSubkeyRangeSet,
|
||||
@ -29,18 +30,27 @@ impl RPCOperationValueChanged {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn key(&self) -> &TypedKey {
|
||||
&self.key
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn subkeys(&self) -> &ValueSubkeyRangeSet {
|
||||
&self.subkeys
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn count(&self) -> u32 {
|
||||
self.count
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn value(&self) -> &SignedValueData {
|
||||
&self.value
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn destructure(self) -> (TypedKey, ValueSubkeyRangeSet, u32, SignedValueData) {
|
||||
(self.key, self.subkeys, self.count, self.value)
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ pub struct RPCOperationWatchValueQ {
|
||||
}
|
||||
|
||||
impl RPCOperationWatchValueQ {
|
||||
#[allow(dead_code)]
|
||||
pub fn new(
|
||||
key: TypedKey,
|
||||
subkeys: ValueSubkeyRangeSet,
|
||||
@ -70,25 +71,37 @@ impl RPCOperationWatchValueQ {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn key(&self) -> &TypedKey {
|
||||
&self.key
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn subkeys(&self) -> &ValueSubkeyRangeSet {
|
||||
&self.subkeys
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn expiration(&self) -> u64 {
|
||||
self.expiration
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn count(&self) -> u32 {
|
||||
self.count
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn watcher(&self) -> &PublicKey {
|
||||
&self.watcher
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn signature(&self) -> &Signature {
|
||||
&self.signature
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn destructure(
|
||||
self,
|
||||
) -> (
|
||||
@ -192,6 +205,7 @@ pub struct RPCOperationWatchValueA {
|
||||
}
|
||||
|
||||
impl RPCOperationWatchValueA {
|
||||
#[allow(dead_code)]
|
||||
pub fn new(expiration: u64, peers: Vec<PeerInfo>) -> Result<Self, RPCError> {
|
||||
if peers.len() > MAX_WATCH_VALUE_A_PEERS_LEN {
|
||||
return Err(RPCError::protocol("WatchValueA peers length too long"));
|
||||
@ -204,12 +218,15 @@ impl RPCOperationWatchValueA {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
pub fn expiration(&self) -> u64 {
|
||||
self.expiration
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
pub fn peers(&self) -> &[PeerInfo] {
|
||||
&self.peers
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
pub fn destructure(self) -> (u64, Vec<PeerInfo>) {
|
||||
(self.expiration, self.peers)
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ use windows_service::*;
|
||||
|
||||
// Register generated `ffi_service_main` with the system and start the service, blocking
|
||||
// this thread until the service is stopped.
|
||||
pub fn run_service(settings: Settings, _args: CmdlineArgs) -> EyreResult<()> {
|
||||
pub fn run_service(_settings: Settings, _args: CmdlineArgs) -> EyreResult<()> {
|
||||
eprintln!("Windows Service mode not implemented yet.");
|
||||
|
||||
//service_dispatcher::start("veilid-server", ffi_veilid_service_main)?;
|
||||
@ -21,6 +21,7 @@ pub fn run_service(settings: Settings, _args: CmdlineArgs) -> EyreResult<()> {
|
||||
|
||||
///////////////
|
||||
define_windows_service!(ffi_veilid_service_main, veilid_service_main);
|
||||
#[allow(dead_code)]
|
||||
fn veilid_service_main(arguments: Vec<OsString>) {
|
||||
if let Err(e) = register_service_handler(arguments) {
|
||||
error!("{}", e);
|
||||
@ -29,7 +30,8 @@ fn veilid_service_main(arguments: Vec<OsString>) {
|
||||
|
||||
///////////////
|
||||
|
||||
fn register_service_handler(arguments: Vec<OsString>) -> windows_service::Result<()> {
|
||||
#[allow(dead_code)]
|
||||
fn register_service_handler(_arguments: Vec<OsString>) -> windows_service::Result<()> {
|
||||
let event_handler = move |control_event| -> ServiceControlHandlerResult {
|
||||
match control_event {
|
||||
ServiceControl::Stop => {
|
||||
|
Loading…
Reference in New Issue
Block a user