mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-04-16 22:13:14 -04:00
[ci skip] add convenience script for clippy
This commit is contained in:
parent
7d81579acc
commit
bb17e7cee6
11
scripts/clippy_all.sh
Executable file
11
scripts/clippy_all.sh
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
pushd $SCRIPTDIR/.. >/dev/null
|
||||
|
||||
cargo-zigbuild clippy --target x86_64-unknown-linux-gnu
|
||||
cargo-zigbuild clippy --target x86_64-unknown-linux-gnu --manifest-path=veilid-server/Cargo.toml --no-default-features --features=default-async-std
|
||||
cargo-zigbuild clippy --target x86_64-pc-windows-gnu
|
||||
cargo-zigbuild clippy --target aarch64-apple-darwin
|
||||
cargo clippy --manifest-path=veilid-wasm/Cargo.toml --target wasm32-unknown-unknown
|
||||
|
||||
popd >/dev/null
|
@ -63,7 +63,7 @@ pub struct IpcIncoming<'a> {
|
||||
internal: Incoming<'a>,
|
||||
}
|
||||
|
||||
impl<'a> Drop for IpcIncoming<'a> {
|
||||
impl Drop for IpcIncoming<'_> {
|
||||
fn drop(&mut self) {
|
||||
// Clean up IPC path
|
||||
if let Err(e) = std::fs::remove_file(&self.path) {
|
||||
@ -72,7 +72,7 @@ impl<'a> Drop for IpcIncoming<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> Stream for IpcIncoming<'a> {
|
||||
impl Stream for IpcIncoming<'_> {
|
||||
type Item = io::Result<IpcStream>;
|
||||
|
||||
fn poll_next(
|
||||
@ -124,7 +124,7 @@ impl IpcListener {
|
||||
}
|
||||
|
||||
/// Returns a stream of incoming connections.
|
||||
pub fn incoming<'a>(&'a mut self) -> io::Result<IpcIncoming<'a>> {
|
||||
pub fn incoming(&mut self) -> io::Result<IpcIncoming<'_>> {
|
||||
if self.path.is_none() {
|
||||
return Err(io::Error::from(io::ErrorKind::NotConnected));
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ pub struct IpcIncoming<'a> {
|
||||
phantom: std::marker::PhantomData<&'a ()>,
|
||||
}
|
||||
|
||||
impl<'t> Stream for IpcIncoming<'t> {
|
||||
impl Stream for IpcIncoming<'_> {
|
||||
type Item = io::Result<IpcStream>;
|
||||
|
||||
fn poll_next<'a>(
|
||||
|
@ -293,7 +293,7 @@ pub struct WindowsInterfacesIterator<'a> {
|
||||
_phantom: std::marker::PhantomData<&'a u8>,
|
||||
}
|
||||
|
||||
impl<'a> Iterator for WindowsInterfacesIterator<'a> {
|
||||
impl Iterator for WindowsInterfacesIterator<'_> {
|
||||
type Item = IpAdapterAddresses;
|
||||
|
||||
#[allow(unsafe_code)]
|
||||
|
@ -129,6 +129,7 @@ cfg_if! {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn async_tcp_listener_incoming(
|
||||
tcp_listener: TcpListener,
|
||||
) -> Pin<Box<impl futures_util::stream::Stream<Item = std::io::Result<TcpStream>> + Send>> {
|
||||
@ -143,6 +144,7 @@ pub fn async_tcp_listener_incoming(
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn split_async_tcp_stream(tcp_stream: TcpStream) -> (ReadHalf, WriteHalf) {
|
||||
cfg_if! {
|
||||
if #[cfg(feature="rt-async-std")] {
|
||||
|
@ -190,7 +190,7 @@ impl VeilidRoutingContext {
|
||||
}
|
||||
|
||||
///////////////////////////////////
|
||||
/// DHT Records
|
||||
// DHT Records
|
||||
|
||||
/// Deterministicly builds the record key for a given schema and owner public key
|
||||
#[allow(clippy::unused_async)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user