Authentication-Results: mail-b.sr.ht; dkim=pass header.d=gmail.com header.i=@gmail.com Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) by mail-b.sr.ht (Postfix) with ESMTPS id 95F4911EF91 for <~radicle-link/dev@lists.sr.ht>; Thu, 25 Aug 2022 15:06:05 +0000 (UTC) Received: by mail-wr1-f41.google.com with SMTP id a4so25040073wrq.1 for <~radicle-link/dev@lists.sr.ht>; Thu, 25 Aug 2022 08:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=jJmaWKP8+aZMieA8vy27sKKknrtXuiq1qxq077sH7i0=; b=qdOuH5wm9WB85dUaBTCLJE0nzyL+WxzBI543ZdnHLQ7ddNVm/P7bO6htPhdufwuWnx kGMY0Z7jk1bdwu0DoSR2PBlCsh8JXVTCfvMHsegOKlwEpSYJs2JFUA2MUPtxR+qk05zl UdvQRkRuatph30UJbGhHk9hPXMYEbh3bDPZGKXElOkJDwU+RABGxno3dlYJu+jxCVbpt YxozgLBlEQmaoiyQqwVphHyoqno9MW/j993n1ZUhqjdwSAIIuZ1e/pnPlRERoPzLzTh4 WeP2FLFq8ptBmeTOZuqjlLaMpJb2f/JI+P67WR9jGgiGgHPhznuQGNVPTAcmkocJZIP4 vTLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=jJmaWKP8+aZMieA8vy27sKKknrtXuiq1qxq077sH7i0=; b=l2FxyYOeYa96eYO2pfpN3ORqWvtAC/tKyXWpcS7vKuAvrE0Vml/GVwZL0FVpiGfRk7 vPIol9PdkaD8F1M5L88LwgCRz+G4hr6s9tISymu0xfCK7MTQ/RovHG0oS0KZ69aTKnTA gq56mr8vU/DRlm041mO8BUHF8//qgS1wWUm8Hwa09Irz79drCYoopJB1am1xqGT1UB15 psS8VyEv0aDo1SbgbYpFtOSZ0ntem5hve9jeLrB/4Z4BQj4j+9Y55UYBQnTEyaRe7uke 7xF+WYb1se+/Og6fvwodI4CYMMUX/NRy8VerPrq1ZxQtwjJtyDuMiyGCfz7wfn6/VKkR oezw== X-Gm-Message-State: ACgBeo0dkAy6ZAiyNPEDbCAjqgCW97ZMwQC/nw3s+uFyzFGjUx4VIQOe S02KbjZWg6sBk2l5gBiJwvuAQT0NHKY75Q== X-Google-Smtp-Source: AA6agR7qxfwspKeAw3r+2IKaCerFfdTE/Z0cc8/bm6xK0rVf3dqXfSXAJapVpOEjlIgJadjU5PWVOw== X-Received: by 2002:adf:ff86:0:b0:225:84e6:a1e8 with SMTP id j6-20020adfff86000000b0022584e6a1e8mr1226119wrr.5.1661439963713; Thu, 25 Aug 2022 08:06:03 -0700 (PDT) Received: from localhost.localdomain ([2a02:8084:a1:4280:a65c:655d:d72e:2898]) by smtp.gmail.com with ESMTPSA id f16-20020a05600c155000b003a5c75bd36fsm6484514wmg.10.2022.08.25.08.06.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 08:06:03 -0700 (PDT) From: Fintan Halpenny To: ~radicle-link/dev@lists.sr.ht Cc: Fintan Halpenny Subject: [PATCH radicle-link v2 1/2] nix: run niv update for rust-1.63.0 Date: Thu, 25 Aug 2022 16:05:57 +0100 Message-Id: <20220825150558.99386-2-fintan.halpenny@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220825093745.244218-1-fintan.halpenny@gmail.com> References: <20220825093745.244218-1-fintan.halpenny@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Update for the latest Rust release. Clippy contains new warnings which are applied in this patch. Signed-off-by: Fintan Halpenny --- cli/linkd-lib/src/api/announce.rs | 4 ++-- cli/linkd-lib/src/api/messages.rs | 14 +++++++------- cli/linkd-lib/src/api/sockets.rs | 6 +++++- cli/linkd-lib/src/api/wire_types.rs | 6 +++--- cli/linkd-lib/src/api/wire_types/request.rs | 2 +- cli/linkd-lib/src/api/wire_types/response.rs | 4 ++-- cli/lnk-identities/src/field.rs | 2 +- cli/lnk-identities/src/git/existing.rs | 2 +- cli/lnk-identities/src/git/new.rs | 2 +- cob/src/authorizing_identity.rs | 4 ++-- cob/src/history.rs | 2 +- librad/src/collaborative_objects.rs | 2 +- librad/src/git/identities/project/heads.rs | 2 +- librad/src/git/local/url.rs | 2 +- librad/src/git/p2p/url.rs | 4 ++-- librad/src/git/refs.rs | 2 +- librad/src/git/storage/read.rs | 2 +- librad/src/git/types/namespace.rs | 2 +- librad/src/git/types/reference.rs | 4 ++-- librad/src/net/protocol/broadcast.rs | 4 ++-- librad/src/net/protocol/broadcast/storage.rs | 2 +- librad/src/net/protocol/gossip.rs | 4 ++-- librad/src/net/protocol/info.rs | 4 ++-- librad/src/net/protocol/membership/rpc.rs | 2 +- librad/t/src/integration/smoke/request_pull.rs | 12 ++++-------- link-git/src/odb/pack.rs | 2 +- link-git/src/protocol/upload_pack.rs | 4 ++-- link-identities/src/generic.rs | 6 +++--- link-identities/src/payload.rs | 16 ++++++++-------- link-identities/src/sign.rs | 2 +- link-identities/t/src/gen/generic.rs | 2 +- link-identities/t/src/gen/payload.rs | 4 ++-- nix/sources.json | 12 ++++++------ test/it-helpers/src/layout.rs | 10 +++++----- test/it-helpers/src/working_copy.rs | 4 ++-- 35 files changed, 79 insertions(+), 79 deletions(-) diff --git a/cli/linkd-lib/src/api/announce.rs b/cli/linkd-lib/src/api/announce.rs index 1752ac48..0b082c56 100644 --- a/cli/linkd-lib/src/api/announce.rs +++ b/cli/linkd-lib/src/api/announce.rs @@ -1,7 +1,7 @@ use librad::{git::Urn, net::protocol::gossip, PeerId}; use radicle_git_ext::Oid; -#[derive(Clone, Debug, PartialEq, minicbor::Decode, minicbor::Encode)] +#[derive(Clone, Debug, PartialEq, Eq, minicbor::Decode, minicbor::Encode)] pub struct Request { #[n(0)] pub urn: Urn, @@ -19,5 +19,5 @@ impl Request { } } -#[derive(Clone, Debug, PartialEq, minicbor::Decode, minicbor::Encode)] +#[derive(Clone, Debug, PartialEq, Eq, minicbor::Decode, minicbor::Encode)] pub struct Response; diff --git a/cli/linkd-lib/src/api/messages.rs b/cli/linkd-lib/src/api/messages.rs index da1657fb..b6db5379 100644 --- a/cli/linkd-lib/src/api/messages.rs +++ b/cli/linkd-lib/src/api/messages.rs @@ -39,7 +39,7 @@ impl Default for RequestId { } } -#[derive(Clone, Debug, minicbor::Decode, minicbor::Encode, PartialEq)] +#[derive(Clone, Debug, minicbor::Decode, minicbor::Encode, PartialEq, Eq)] #[cbor(transparent)] pub struct UserAgent(#[n(0)] String); @@ -61,20 +61,20 @@ impl<'a> From<&'a UserAgent> for &'a str { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum RequestMode { FireAndForget, ReportProgress, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Request { pub user_agent: UserAgent, pub mode: RequestMode, pub payload: RequestPayload, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum RequestPayload { Announce(announce::Request), RequestPull(request_pull::Request), @@ -92,13 +92,13 @@ impl From for RequestPayload { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Response

{ pub request_id: RequestId, pub payload: ResponsePayload

, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum ResponsePayload

{ Ack, Progress(String), @@ -106,7 +106,7 @@ pub enum ResponsePayload

{ Success(P), } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum SomeSuccess { Announce(announce::Response), RequestPull(request_pull::Response), diff --git a/cli/linkd-lib/src/api/sockets.rs b/cli/linkd-lib/src/api/sockets.rs index 1e00984b..25ffec8d 100644 --- a/cli/linkd-lib/src/api/sockets.rs +++ b/cli/linkd-lib/src/api/sockets.rs @@ -142,7 +142,11 @@ fn profile_sockets(profile: &Profile, peer_id: &PeerId) -> Result { pub headers: Headers, pub payload: Option>, } -#[derive(Debug, Clone, minicbor::Encode, minicbor::Decode, PartialEq)] +#[derive(Debug, Clone, minicbor::Encode, minicbor::Decode, PartialEq, Eq)] #[cbor(transparent)] pub struct Progress(#[n(0)] String); @@ -52,7 +52,7 @@ impl From for Progress { } } -#[derive(Debug, Clone, minicbor::Encode, minicbor::Decode, PartialEq)] +#[derive(Debug, Clone, minicbor::Encode, minicbor::Decode, PartialEq, Eq)] #[cbor(transparent)] pub struct Error(#[n(0)] String); diff --git a/cli/linkd-lib/src/api/wire_types/request.rs b/cli/linkd-lib/src/api/wire_types/request.rs index 8a87b5fd..b31d1dd1 100644 --- a/cli/linkd-lib/src/api/wire_types/request.rs +++ b/cli/linkd-lib/src/api/wire_types/request.rs @@ -90,7 +90,7 @@ impl TryFrom for messages::Request { // TODO: Introduce get-connected-peers, get-membership-info, and get-stats -- 2, // 3, and 4 respectively. -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Kind { // CBOR encode and decode maps to 1 Announce, diff --git a/cli/linkd-lib/src/api/wire_types/response.rs b/cli/linkd-lib/src/api/wire_types/response.rs index dd9f580e..4bd6744d 100644 --- a/cli/linkd-lib/src/api/wire_types/response.rs +++ b/cli/linkd-lib/src/api/wire_types/response.rs @@ -78,7 +78,7 @@ pub enum DecodeError { UnknownResponseKind(u8), } -#[derive(Debug, Clone, Copy, PartialEq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum Kind { Ack, Success, @@ -87,7 +87,7 @@ pub enum Kind { Unknown(u8), } -#[derive(Clone, Debug, PartialEq, minicbor::Decode, minicbor::Encode)] +#[derive(Clone, Debug, PartialEq, Eq, minicbor::Decode, minicbor::Encode)] #[cbor(map)] pub struct Headers { #[n(0)] diff --git a/cli/lnk-identities/src/field.rs b/cli/lnk-identities/src/field.rs index 5f51a24c..95cdcb0c 100644 --- a/cli/lnk-identities/src/field.rs +++ b/cli/lnk-identities/src/field.rs @@ -148,7 +148,7 @@ pub mod person { Url::parse("https://radicle.xyz/link/person/default_branch").unwrap(); } - #[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] + #[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct DefaultBranch { #[serde(rename = "default_branch")] pub name: Cstring, diff --git a/cli/lnk-identities/src/git/existing.rs b/cli/lnk-identities/src/git/existing.rs index bc542969..a5f09f2d 100644 --- a/cli/lnk-identities/src/git/existing.rs +++ b/cli/lnk-identities/src/git/existing.rs @@ -35,7 +35,7 @@ pub enum Error { } /// For construction, use [`Existing::new`] followed by [`Existing::validate`]. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct Existing { payload: P, diff --git a/cli/lnk-identities/src/git/new.rs b/cli/lnk-identities/src/git/new.rs index c8c620f6..f7bd17ae 100644 --- a/cli/lnk-identities/src/git/new.rs +++ b/cli/lnk-identities/src/git/new.rs @@ -33,7 +33,7 @@ pub enum Error { } /// For construction, use [`New::new`] followed by [`New::validate`]. -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] +#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct New { payload: P, diff --git a/cob/src/authorizing_identity.rs b/cob/src/authorizing_identity.rs index d8a0ea50..814caf04 100644 --- a/cob/src/authorizing_identity.rs +++ b/cob/src/authorizing_identity.rs @@ -22,7 +22,7 @@ pub trait AuthorizingIdentity: std::fmt::Debug { impl AuthorizingIdentity for VerifiedPerson { fn urn(&self) -> Urn { - let p: &Person = &*self; + let p: &Person = self; p.urn() } @@ -44,7 +44,7 @@ impl AuthorizingIdentity for VerifiedPerson { impl AuthorizingIdentity for VerifiedProject { fn urn(&self) -> Urn { - let p: &Project = &*self; + let p: &Project = self; p.urn() } diff --git a/cob/src/history.rs b/cob/src/history.rs index ee7f5e09..6d3666d2 100644 --- a/cob/src/history.rs +++ b/cob/src/history.rs @@ -206,7 +206,7 @@ impl From for EntryId { } /// One entry in the dependency graph for a change -#[derive(Clone, Debug, PartialEq, Hash, minicbor::Encode, minicbor::Decode)] +#[derive(Clone, Debug, PartialEq, Eq, Hash, minicbor::Encode, minicbor::Decode)] pub struct HistoryEntry { #[n(0)] id: EntryId, diff --git a/librad/src/collaborative_objects.rs b/librad/src/collaborative_objects.rs index 35049a7d..1e63343c 100644 --- a/librad/src/collaborative_objects.rs +++ b/librad/src/collaborative_objects.rs @@ -356,7 +356,7 @@ fn resolve_authorizing_identity( } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub enum ObjRefMatch { Local(ObjectId), Remote(ObjectId), diff --git a/librad/src/git/identities/project/heads.rs b/librad/src/git/identities/project/heads.rs index 1fd444f7..9751c375 100644 --- a/librad/src/git/identities/project/heads.rs +++ b/librad/src/git/identities/project/heads.rs @@ -16,7 +16,7 @@ use crate::{ use git_ext::{is_not_found_err, RefLike}; use git_ref_format::{lit, name, Namespaced, Qualified, RefStr, RefString}; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum DefaultBranchHead { /// Not all delegates agreed on an ancestry tree. Each set of diverging /// delegates is included as a `Fork` diff --git a/librad/src/git/local/url.rs b/librad/src/git/local/url.rs index f92180b7..633da0ff 100644 --- a/librad/src/git/local/url.rs +++ b/librad/src/git/local/url.rs @@ -15,7 +15,7 @@ use thiserror::Error; use super::Urn; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct LocalUrl { pub urn: Urn, pub(super) active_index: Option, diff --git a/librad/src/git/p2p/url.rs b/librad/src/git/p2p/url.rs index 5eb53758..72d2385d 100644 --- a/librad/src/git/p2p/url.rs +++ b/librad/src/git/p2p/url.rs @@ -16,7 +16,7 @@ use url::Url; use crate::{identities::urn::Urn, PeerId}; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct GitUrl { pub local_peer: PeerId, pub remote_peer: PeerId, @@ -125,7 +125,7 @@ where } } -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct GitUrlRef<'a, R> { pub local_peer: &'a PeerId, pub remote_peer: &'a PeerId, diff --git a/librad/src/git/refs.rs b/librad/src/git/refs.rs index 9add5e52..a96d7fb5 100644 --- a/librad/src/git/refs.rs +++ b/librad/src/git/refs.rs @@ -561,7 +561,7 @@ impl Signed { pub fn verify(unknown: Signed, signer: &PeerId) -> Result { let canonical = unknown.refs.canonical_form()?; - if unknown.signature.verify(&canonical, &*signer) { + if unknown.signature.verify(&canonical, &**signer) { Ok(Signed { refs: unknown.refs, signature: unknown.signature, diff --git a/librad/src/git/storage/read.rs b/librad/src/git/storage/read.rs index 6d2a0d4c..6193b9ce 100644 --- a/librad/src/git/storage/read.rs +++ b/librad/src/git/storage/read.rs @@ -388,7 +388,7 @@ impl ReadOnlyStorage for ReadOnly { RefLike: From<&'b Ref>, { self.backend - .refname_to_id(&RefLike::from(reference).to_string()) + .refname_to_id(&RefLike::from(reference)) .map(ext::Oid::from) .map_err(Error::from) } diff --git a/librad/src/git/types/namespace.rs b/librad/src/git/types/namespace.rs index d7edb859..c1d91abf 100644 --- a/librad/src/git/types/namespace.rs +++ b/librad/src/git/types/namespace.rs @@ -19,7 +19,7 @@ pub trait AsNamespace: Into + sealed::Sealed { } } -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Namespace(Urn); impl AsNamespace for Namespace diff --git a/librad/src/git/types/reference.rs b/librad/src/git/types/reference.rs index 1471da33..9a44c9f8 100644 --- a/librad/src/git/types/reference.rs +++ b/librad/src/git/types/reference.rs @@ -27,7 +27,7 @@ pub type Many = ext::RefspecPattern; /// Alias for [`Many`]. pub type Multiple = Many; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub enum RefsCategory { Heads, Rad, @@ -129,7 +129,7 @@ impl AsRemote for &ext::RefLike {} impl sealed::Sealed for ext::RefLike {} impl sealed::Sealed for &ext::RefLike {} -#[derive(Debug, Clone, PartialEq)] +#[derive(Debug, Clone, PartialEq, Eq)] pub struct Reference { /// The remote portion of this reference. pub remote: Option, diff --git a/librad/src/net/protocol/broadcast.rs b/librad/src/net/protocol/broadcast.rs index b6ba22e6..2455be6e 100644 --- a/librad/src/net/protocol/broadcast.rs +++ b/librad/src/net/protocol/broadcast.rs @@ -24,7 +24,7 @@ pub use metrics::Metrics; mod storage; pub use storage::{LocalStorage, PutResult}; -#[derive(Clone, Debug, PartialEq, minicbor::Encode, minicbor::Decode)] +#[derive(Clone, Debug, PartialEq, Eq, minicbor::Encode, minicbor::Decode)] pub enum Message { #[n(0)] #[cbor(array)] @@ -103,7 +103,7 @@ impl Hash for Message { // We should've defined `Message` as a flat struct with a discriminator field. // Since we didn't, introducing v2 extensions through an indirection is slightly // more convenient, as we don't have to deal with all fields being optional. -#[derive(Clone, Debug, PartialEq, minicbor::Encode, minicbor::Decode)] +#[derive(Clone, Debug, PartialEq, Eq, minicbor::Encode, minicbor::Decode)] #[cbor(array)] pub struct Ext { /// Sequence number of the [`Message`], unique per [`Message::origin`]. diff --git a/librad/src/net/protocol/broadcast/storage.rs b/librad/src/net/protocol/broadcast/storage.rs index 91debf6c..5fe1c3de 100644 --- a/librad/src/net/protocol/broadcast/storage.rs +++ b/librad/src/net/protocol/broadcast/storage.rs @@ -6,7 +6,7 @@ use crate::PeerId; /// Result of applying a broadcast update to local storage. -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum PutResult { /// The `Update` was not previously seen, and applied successfully. /// diff --git a/librad/src/net/protocol/gossip.rs b/librad/src/net/protocol/gossip.rs index 13bd21a5..bae5199a 100644 --- a/librad/src/net/protocol/gossip.rs +++ b/librad/src/net/protocol/gossip.rs @@ -9,7 +9,7 @@ use minicbor::{Decode, Decoder, Encode, Encoder}; use crate::{identities::git::Urn, PeerId}; -#[derive(Clone, Debug, Hash, PartialEq)] +#[derive(Clone, Debug, Hash, PartialEq, Eq)] pub enum Rev { Git(git2::Oid), } @@ -58,7 +58,7 @@ impl<'de> Decode<'de> for Rev { } /// The gossip payload type -#[derive(Clone, Debug, Hash, PartialEq, Encode, Decode)] +#[derive(Clone, Debug, Hash, PartialEq, Eq, Encode, Decode)] #[cbor(array)] pub struct Payload { /// URN of an updated or wanted repo. diff --git a/librad/src/net/protocol/info.rs b/librad/src/net/protocol/info.rs index a069344f..57cfef4a 100644 --- a/librad/src/net/protocol/info.rs +++ b/librad/src/net/protocol/info.rs @@ -78,7 +78,7 @@ impl From> for (PeerId, Vec) { } } -#[derive(Debug, Clone, PartialEq, Decode, Encode)] +#[derive(Debug, Clone, PartialEq, Eq, Decode, Encode)] #[cbor(array)] pub struct GenericPeerInfo { #[n(0)] @@ -99,7 +99,7 @@ impl GenericPeerInfo> { } } -#[derive(Debug, Clone, PartialEq, Decode, Encode)] +#[derive(Debug, Clone, PartialEq, Eq, Decode, Encode)] #[cbor(array)] pub struct PeerAdvertisement { #[n(0)] diff --git a/librad/src/net/protocol/membership/rpc.rs b/librad/src/net/protocol/membership/rpc.rs index 928bf6ad..17698b5c 100644 --- a/librad/src/net/protocol/membership/rpc.rs +++ b/librad/src/net/protocol/membership/rpc.rs @@ -5,7 +5,7 @@ use crate::net::protocol::info::{PeerAdvertisement, PeerInfo}; -#[derive(Debug, Clone, PartialEq, minicbor::Encode, minicbor::Decode)] +#[derive(Debug, Clone, PartialEq, Eq, minicbor::Encode, minicbor::Decode)] pub enum Message { #[n(0)] #[cbor(array)] diff --git a/librad/t/src/integration/smoke/request_pull.rs b/librad/t/src/integration/smoke/request_pull.rs index 0e448414..acd13346 100644 --- a/librad/t/src/integration/smoke/request_pull.rs +++ b/librad/t/src/integration/smoke/request_pull.rs @@ -34,13 +34,11 @@ fn responds_peer_and_client() { let responder = net.peers().index(0); let requester = testnet::TestClient::init().await.unwrap(); let TestProject { project, .. } = { - let proj = requester + requester .using_storage(TestProject::create) .await .unwrap() - .unwrap(); - - proj + .unwrap() }; let mut rp = requester @@ -81,13 +79,11 @@ fn responds_peer_and_peer() { let responder = net.peers().index(0); let requester = net.peers().index(1); let TestProject { project, .. } = { - let proj = requester + requester .using_storage(TestProject::create) .await .unwrap() - .unwrap(); - - proj + .unwrap() }; let mut rp = requester diff --git a/link-git/src/odb/pack.rs b/link-git/src/odb/pack.rs index 97155a14..f1e3ed45 100644 --- a/link-git/src/odb/pack.rs +++ b/link-git/src/odb/pack.rs @@ -58,7 +58,7 @@ impl AsRef for Data { } } -#[derive(Clone, PartialEq)] +#[derive(Clone, PartialEq, Eq)] pub struct Info { pub(super) hash: u64, pub data_path: PathBuf, diff --git a/link-git/src/protocol/upload_pack.rs b/link-git/src/protocol/upload_pack.rs index 0f7739a3..e509c93e 100644 --- a/link-git/src/protocol/upload_pack.rs +++ b/link-git/src/protocol/upload_pack.rs @@ -14,7 +14,7 @@ use versions::Version; mod legacy; -#[derive(Debug, PartialEq)] +#[derive(Debug, PartialEq, Eq)] pub struct Header { pub path: String, pub host: Option<(String, Option)>, @@ -72,7 +72,7 @@ where W: AsyncWrite + Unpin, { let mut recv = BufReader::new(recv); - let header: Header = match recv.fill_buf().await?.get(0) { + let header: Header = match recv.fill_buf().await?.first() { // legacy clients don't send a proper pktline header :( Some(b'g') => { let mut buf = String::with_capacity(256); diff --git a/link-identities/src/generic.rs b/link-identities/src/generic.rs index 0e90d8b8..6fff531c 100644 --- a/link-identities/src/generic.rs +++ b/link-identities/src/generic.rs @@ -21,7 +21,7 @@ pub mod error; /// /// In `git`, this is represented as a `blob`, where the previous revision /// `replaces` is a `tree` oid. -#[derive(Clone, Debug, PartialEq, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize)] pub struct Doc { /// Protocol version. Always serialised as `0` (zero). pub version: u8, @@ -131,7 +131,7 @@ impl sealed::Sealed for Doc {} /// `tree` hash. The signatures are encoded in the commit message as [trailers]. /// /// [trailers]: https://git-scm.com/docs/git-interpret-trailers -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct Identity { pub content_id: ContentId, pub root: Revision, @@ -253,7 +253,7 @@ pub struct Verified; /// The verification status (ie. which predicates where successfully applied to /// `T`) is tracked on the type level, as intermediate states may have meaning /// elsewhere. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Verifying { inner: T, state: PhantomData, diff --git a/link-identities/src/payload.rs b/link-identities/src/payload.rs index 3f736231..9269e70e 100644 --- a/link-identities/src/payload.rs +++ b/link-identities/src/payload.rs @@ -53,7 +53,7 @@ lazy_static! { /// Structure `radicle-link` expects to be part of a [`Payload`] describing a /// personal identity. -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct Person { pub name: Cstring, } @@ -62,7 +62,7 @@ impl sealed::Sealed for Person {} /// Structure `radicle-link` expects to be part of a [`Payload`] describing a /// project identity. -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct Project { pub name: Cstring, pub description: Option, @@ -139,7 +139,7 @@ pub type PersonPayload = Payload; pub type ProjectPayload = Payload; /// [`Payload`] for which the type is not known statically. -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] #[serde(untagged)] #[non_exhaustive] pub enum SomePayload { @@ -156,7 +156,7 @@ pub enum SomePayload { /// /// For compatibility between a native extension and a runtime extension there /// is a `From` implementation if the type implemenets [`HasNamespace`]. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Ext { pub namespace: Url, pub val: T, @@ -243,7 +243,7 @@ where /// Note that it is an error during deserialisation if duplicate namespaces are /// found in the input -- this is unlike normal JSON deserialisation, which /// would just treat objects as maps, retaining the last key found in the input. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Payload { pub subject: T, ext: BTreeMap, @@ -419,7 +419,7 @@ where } } -#[derive(Clone, Debug, PartialEq, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Deserialize)] #[serde(untagged)] pub enum SomeDelegations where @@ -434,7 +434,7 @@ where /// /// This is just a set of [`PublicKey`]s. Note that it is a deserialisation /// error if duplicate elements are found in the input. -#[derive(Clone, Debug, PartialEq, serde::Serialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize)] pub struct PersonDelegations(NonEmptyOrderedSet); impl Deref for PersonDelegations { @@ -566,7 +566,7 @@ where /// Note, however, that the specification requires an additional validation step /// after resolving any [`Urn`] pointers -- the identity document is invalid if /// it contains duplicate _keys_. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct ProjectDelegations { inner: BTreeSet>, } diff --git a/link-identities/src/sign.rs b/link-identities/src/sign.rs index cd7a54ab..a584171b 100644 --- a/link-identities/src/sign.rs +++ b/link-identities/src/sign.rs @@ -21,7 +21,7 @@ pub mod error; const TRAILER_TOKEN: &str = "X-Rad-Signature"; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Signature { key: PublicKey, sig: crypto::Signature, diff --git a/link-identities/t/src/gen/generic.rs b/link-identities/t/src/gen/generic.rs index 22b4abdc..7cb7ab13 100644 --- a/link-identities/t/src/gen/generic.rs +++ b/link-identities/t/src/gen/generic.rs @@ -51,7 +51,7 @@ impl AsRef<[u8]> for Boring { } /// [`Vec`] with at least 2 elements. -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct VecOf2(Vec); impl From> for Vec { diff --git a/link-identities/t/src/gen/payload.rs b/link-identities/t/src/gen/payload.rs index 99503c5d..cc176221 100644 --- a/link-identities/t/src/gen/payload.rs +++ b/link-identities/t/src/gen/payload.rs @@ -36,7 +36,7 @@ static UPSTREAM_USER_NAMESPACE: Lazy = static UPSTREAM_PROJECT_NAMESPACE: Lazy = Lazy::new(|| Url::parse("https://radicle.xyz/upstream/project/v1").unwrap()); -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct UpstreamUser { #[serde(rename = "radicle-registry-name")] pub registered_as: Cstring, @@ -56,7 +56,7 @@ impl HasNamespace for UpstreamUser { } } -#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)] pub struct UpstreamProject { #[serde(rename = "radicle-registry-name")] pub registered_as: Cstring, diff --git a/nix/sources.json b/nix/sources.json index 3004b521..bab035b3 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -17,10 +17,10 @@ "homepage": "", "owner": "NixOS", "repo": "nixpkgs", - "rev": "399c514226ac48d7855838d0777f47f2fa59730a", - "sha256": "0c1nka1sxfprf457wapk5pydbfxbspjblys44d2kxfkczad246v5", + "rev": "eabc38219184cc3e04a974fe31857d8e0eac098d", + "sha256": "04ffwp2gzq0hhz7siskw6qh9ys8ragp7285vi1zh8xjksxn1msc5", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/399c514226ac48d7855838d0777f47f2fa59730a.tar.gz", + "url": "https://github.com/NixOS/nixpkgs/archive/eabc38219184cc3e04a974fe31857d8e0eac098d.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "rust-overlay": { @@ -29,10 +29,10 @@ "homepage": "", "owner": "oxalica", "repo": "rust-overlay", - "rev": "8b4c5bef319198920fd03a916dd5f6600147358b", - "sha256": "1mvaqkjrxqgvpqja8qa33r8vb59q8hwyh1y3sg3nqxh1lvsw63n6", + "rev": "c97cf9d581e09b767f5e3503b43dc3e4cd91bd99", + "sha256": "02r3y1x4sdzdy0qzds6286v51406jk7ywks6fjivmb3c5mlhvq8x", "type": "tarball", - "url": "https://github.com/oxalica/rust-overlay/archive/8b4c5bef319198920fd03a916dd5f6600147358b.tar.gz", + "url": "https://github.com/oxalica/rust-overlay/archive/c97cf9d581e09b767f5e3503b43dc3e4cd91bd99.tar.gz", "url_template": "https://github.com///archive/.tar.gz" } } diff --git a/test/it-helpers/src/layout.rs b/test/it-helpers/src/layout.rs index a73d1147..508c79c1 100644 --- a/test/it-helpers/src/layout.rs +++ b/test/it-helpers/src/layout.rs @@ -16,7 +16,7 @@ use librad::{ PeerId, }; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct References { commits: Vec, id: RadId, @@ -24,7 +24,7 @@ pub struct References { ids: Vec, } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct RadId { pub name: Reference, pub target: Option, @@ -55,7 +55,7 @@ impl Display for RadId { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct RadSelf { pub name: Reference, pub exists: bool, @@ -77,7 +77,7 @@ impl Display for RadSelf { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Delegate { pub name: Reference, pub exists: bool, @@ -106,7 +106,7 @@ impl Display for Delegate { } } -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Commit { pub urn: Urn, pub oid: ext::Oid, diff --git a/test/it-helpers/src/working_copy.rs b/test/it-helpers/src/working_copy.rs index b27a149a..ac329460 100644 --- a/test/it-helpers/src/working_copy.rs +++ b/test/it-helpers/src/working_copy.rs @@ -271,12 +271,12 @@ where let peer_branch = WorkingRemote::Peer(remote).remote_ref(branch); let peer_commit = self .repo - .find_reference(&peer_branch.to_string())? + .find_reference(peer_branch.as_ref())? .peel_to_commit()?; let local_branch = Qualified::from(lit::refs_heads(branch)); let local_commit = self .repo - .find_reference(&local_branch.to_string())? + .find_reference(local_branch.as_ref())? .peel_to_commit()?; let message = format!("merge {} into {}", peer_branch, local_branch); -- 2.31.1