remove several warnings from unused imports

This commit is contained in:
Mario Voigt 2025-03-07 00:33:14 +01:00
parent d428ae91cf
commit 140752b4e3
10 changed files with 9 additions and 17 deletions

View File

@ -113,7 +113,7 @@ impl AuthenticationSystem for Authentication {
f.write_char(')') f.write_char(')')
} }
} }
let mut response; let response;
let mut builder = results.get(); let mut builder = results.get();
if let State::Running(mut session, manager) = if let State::Running(mut session, manager) =

View File

@ -178,7 +178,7 @@ impl InUseServer for Machine {
fn send_raw_data( fn send_raw_data(
&mut self, &mut self,
mut params: inuse::SendRawDataParams, params: inuse::SendRawDataParams,
_: inuse::SendRawDataResults, _: inuse::SendRawDataResults,
) -> Promise<(), ::capnp::Error> { ) -> Promise<(), ::capnp::Error> {
let data: Vec<u8> = pry!(pry!(params.get()).get_data()).to_vec(); let data: Vec<u8> = pry!(pry!(params.get()).get_data()).to_vec();
@ -188,7 +188,7 @@ impl InUseServer for Machine {
} }
impl ProdableServer for Machine { impl ProdableServer for Machine {
fn prod_with_data(&mut self, mut params: ProdWithDataParams, _: ProdWithDataResults) -> Promise<(), Error> { fn prod_with_data(&mut self, params: ProdWithDataParams, _: ProdWithDataResults) -> Promise<(), Error> {
let data: Vec<u8> = pry!(pry!(params.get()).get_data()).to_vec(); let data: Vec<u8> = pry!(pry!(params.get()).get_data()).to_vec();
self.resource.send_raw(data); self.resource.send_raw(data);
Promise::ok(()) Promise::ok(())

View File

@ -36,7 +36,7 @@ impl PermissionSystem for Permissions {
tracing::trace!("method call"); tracing::trace!("method call");
let roles = self.roles.list().collect::<Vec<&String>>(); let roles = self.roles.list().collect::<Vec<&String>>();
let mut builder = results.get(); let builder = results.get();
let mut b = builder.init_role_list(roles.len() as u32); let mut b = builder.init_role_list(roles.len() as u32);
for (i, role) in roles.into_iter().enumerate() { for (i, role) in roles.into_iter().enumerate() {
let mut role_builder = b.reborrow().get(i as u32); let mut role_builder = b.reborrow().get(i as u32);

View File

@ -214,7 +214,7 @@ impl card_d_e_s_fire_e_v2::Server for User {
.userdata .userdata
.kv .kv
.get("cardtoken") { .get("cardtoken") {
let mut b = results.get(); let b = results.get();
let mut lb = b.init_token_list(1); let mut lb = b.init_token_list(1);
lb.set(0, tk.as_ref()); lb.set(0, tk.as_ref());
} }

View File

@ -7,7 +7,6 @@ use console_api::{async_ops, instrument, resources, tasks};
use crossbeam_channel::{Receiver, TryRecvError}; use crossbeam_channel::{Receiver, TryRecvError};
use futures_util::{FutureExt, StreamExt}; use futures_util::{FutureExt, StreamExt};
use std::collections::HashMap; use std::collections::HashMap;
use std::num::NonZeroU64;
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc; use std::sync::Arc;
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};

View File

@ -1,5 +1,4 @@
use crossbeam_channel::{Sender, TrySendError}; use crossbeam_channel::{Sender, TrySendError};
use std::borrow::Borrow;
use std::cell::RefCell; use std::cell::RefCell;
use std::net::IpAddr; use std::net::IpAddr;
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
@ -9,7 +8,7 @@ use thread_local::ThreadLocal;
use tracing::span; use tracing::span;
use tracing_core::span::Attributes; use tracing_core::span::Attributes;
use tracing_core::{Interest, Metadata, Subscriber}; use tracing_core::{Interest, Metadata, Subscriber};
use tracing_subscriber::layer::{Context, Filter}; use tracing_subscriber::layer::Context;
use tracing_subscriber::registry::{LookupSpan, SpanRef}; use tracing_subscriber::registry::{LookupSpan, SpanRef};
use tracing_subscriber::Layer; use tracing_subscriber::Layer;

View File

@ -4,11 +4,9 @@ use async_compat::CompatExt;
use console_api::instrument; use console_api::instrument;
use console_api::instrument::instrument_server::{Instrument, InstrumentServer}; use console_api::instrument::instrument_server::{Instrument, InstrumentServer};
use console_api::tasks; use console_api::tasks;
use futures_util::TryStreamExt;
use std::error::Error; use std::error::Error;
use std::future::Future;
use std::io::IoSlice; use std::io::IoSlice;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr}; use std::net::{IpAddr, Ipv4Addr, SocketAddr};
use std::pin::Pin; use std::pin::Pin;
use std::task::{Context, Poll}; use std::task::{Context, Poll};
use tokio::io::AsyncRead as TokioAsyncRead; use tokio::io::AsyncRead as TokioAsyncRead;
@ -95,7 +93,7 @@ impl Server {
} }
pub async fn serve( pub async fn serve(
mut self, /*, incoming: I */ self, /*, incoming: I */
) -> Result<(), Box<dyn Error + Send + Sync + 'static>> { ) -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
let svc = InstrumentServer::new(self); let svc = InstrumentServer::new(self);

View File

@ -22,9 +22,6 @@ use std::marker::PhantomData;
use std::mem::MaybeUninit; use std::mem::MaybeUninit;
use std::sync::Arc; use std::sync::Arc;
use std::time::Duration; use std::time::Duration;
use tracing::field::FieldSet;
use tracing::metadata::Kind;
use tracing::{Instrument, Level, Span};
#[derive(Debug)] #[derive(Debug)]
struct Spooler<'a> { struct Spooler<'a> {

View File

@ -2,7 +2,6 @@ use lightproc::GroupId;
use once_cell::sync::OnceCell; use once_cell::sync::OnceCell;
use sharded_slab::pool::Ref; use sharded_slab::pool::Ref;
use sharded_slab::{Clear, Pool}; use sharded_slab::{Clear, Pool};
use std::borrow::Borrow;
use std::cell; use std::cell;
use std::cell::RefCell; use std::cell::RefCell;
use std::sync::atomic::{fence, AtomicUsize, Ordering}; use std::sync::atomic::{fence, AtomicUsize, Ordering};

View File

@ -65,7 +65,7 @@ use std::{
}, },
thread, thread,
}; };
use tracing::{debug, trace}; use tracing::debug;
/// The default thread park timeout before checking for new tasks. /// The default thread park timeout before checking for new tasks.
const THREAD_PARK_TIMEOUT: Duration = Duration::from_millis(1); const THREAD_PARK_TIMEOUT: Duration = Duration::from_millis(1);