Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ clippy.type_complexity = "allow"
clippy.unnecessary_wraps = "warn"
clippy.manual_let_else = "warn"
clippy.dbg_macro = "warn"
clippy.wildcard_imports = "warn"

[workspace.metadata.release]
pre-release-hook = [
Expand Down
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ disallowed-methods = [
{ path = "futures::channel::mpsc::unbounded", reason = "does not enforce backpressure" },
]
avoid-breaking-exported-api = false
allowed-wildcard-imports = ["super"]
2 changes: 1 addition & 1 deletion core/src/generated/envelope_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion core/src/generated/peer_record_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion identity/src/generated/keys_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::*;

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion identity/src/peer_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ impl<'de> Deserialize<'de> for PeerId {
where
D: serde::Deserializer<'de>,
{
use serde::de::*;
use serde::de::{Error, Unexpected, Visitor};

struct PeerIdVisitor;

Expand Down
24 changes: 12 additions & 12 deletions libp2p/src/builder/phase.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@
mod tcp;
mod websocket;

use bandwidth_logging::*;
use bandwidth_metrics::*;
use behaviour::*;
use build::*;
use dns::*;
use bandwidth_logging::BandwidthLoggingPhase;
use bandwidth_metrics::BandwidthMetricsPhase;
use behaviour::{BehaviourPhase, TryIntoBehaviour};
use build::BuildPhase;
use dns::DnsPhase;
use libp2p_core::{muxing::StreamMuxerBox, Transport};
use libp2p_identity::Keypair;
use other_transport::*;
use provider::*;
use quic::*;
use relay::*;
use swarm::*;
use tcp::*;
use websocket::*;
use other_transport::{OtherTransportPhase, TryIntoTransport};
use provider::{AsyncStd, NoProviderSpecified, ProviderPhase};

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-unknown-unknown

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / examples

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-unknown-emscripten

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-wasi

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile with select features (mdns tcp dns tokio)

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / IPFS Integration tests

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Test libp2p

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Test libp2p-server

unresolved import `provider::AsyncStd`

Check failure on line 25 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Test libp2p-perf

unresolved import `provider::AsyncStd`
use quic::QuicPhase;
use relay::{NoRelayBehaviour, RelayPhase};
use swarm::SwarmPhase;
use tcp::TcpPhase;
use websocket::{WebsocketError, WebsocketPhase};

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-unknown-unknown

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / examples

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-unknown-emscripten

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile on wasm32-wasi

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile with select features (mdns tcp dns tokio)

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / IPFS Integration tests

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Compile with select features (mdns tcp dns async-std)

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Test libp2p

unresolved import `websocket::WebsocketError`

Check failure on line 30 in libp2p/src/builder/phase.rs

View workflow job for this annotation

GitHub Actions / Test libp2p-perf

unresolved import `websocket::WebsocketError`

use super::{
select_muxer::SelectMuxerUpgrade, select_security::SelectSecurityUpgrade, SwarmBuilder,
Expand Down
2 changes: 1 addition & 1 deletion misc/quick-protobuf-codec/src/generated/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion misc/webrtc-utils/src/generated/webrtc/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/autonat/src/v1/generated/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/autonat/src/v2/generated/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::*;

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/dcutr/src/generated/holepunch/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/floodsub/src/generated/floodsub/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/generated/compat/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/generated/gossipsub/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/identify/src/generated/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/behaviour.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use crate::{
addresses::Addresses,
bootstrap,
handler::{Handler, HandlerEvent, HandlerIn, RequestId},
jobs::*,
jobs::{AddProviderJob, PutRecordJob, JOBS_MAX_NEW_QUERIES, JOBS_MAX_QUERIES},
kbucket::{self, Distance, KBucketConfig, KBucketsTable, NodeStatus},
protocol,
protocol::{ConnectionType, KadPeer, ProtocolConfig},
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/generated/dht/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/kad/src/kbucket/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use sha2::{
digest::generic_array::{typenum::U32, GenericArray},
Digest, Sha256,
};
use uint::*;
use uint::{construct_uint, unroll};

use crate::record;

Expand Down
2 changes: 1 addition & 1 deletion protocols/relay/src/generated/message_v2/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[derive(Debug, PartialEq, Eq, Clone, Copy)]
Expand Down
2 changes: 1 addition & 1 deletion protocols/rendezvous/src/generated/rendezvous/pb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::{sizeof_len, sizeof_varint};
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion transports/noise/src/generated/payload/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
2 changes: 1 addition & 1 deletion transports/plaintext/src/generated/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


use quick_protobuf::{MessageInfo, MessageRead, MessageWrite, BytesReader, Writer, WriterBackend, Result};
use quick_protobuf::sizeofs::*;
use quick_protobuf::sizeofs::sizeof_len;
use super::*;

#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down
8 changes: 7 additions & 1 deletion transports/tls/src/certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,13 @@ impl P2pCertificate<'_> {
fn signature_scheme(&self) -> Result<rustls::SignatureScheme, webpki::Error> {
// Certificates MUST use the NamedCurve encoding for elliptic curve parameters.
// Endpoints MUST abort the connection attempt if it is not used.
use oid_registry::*;
use oid_registry::{
OID_EC_P256, OID_KEY_TYPE_EC_PUBLIC_KEY, OID_NIST_EC_P384, OID_NIST_EC_P521,
OID_NIST_HASH_SHA256, OID_NIST_HASH_SHA384, OID_NIST_HASH_SHA512,
OID_PKCS1_RSAENCRYPTION, OID_PKCS1_RSASSAPSS, OID_PKCS1_SHA256WITHRSA,
OID_PKCS1_SHA384WITHRSA, OID_PKCS1_SHA512WITHRSA, OID_SIG_ECDSA_WITH_SHA256,
OID_SIG_ECDSA_WITH_SHA384, OID_SIG_ECDSA_WITH_SHA512, OID_SIG_ED25519, OID_SIG_ED448,
};
use rustls::SignatureScheme::*;

let signature_algorithm = &self.certificate.signature_algorithm;
Expand Down
Loading