don't
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore(lexicon): satiate pendantic clippy

Signed-off-by: tjh <x@tjh.dev>

tjh 9db2b2af 4ce80f0f

+13 -5
+12 -5
crates/gordian-lexicon/src/extra/objectid.rs
··· 1 1 use core::fmt; 2 + use core::hash; 2 3 use std::marker::PhantomData; 3 4 use std::ops; 4 5 use std::str::FromStr; ··· 10 9 use serde::ser::SerializeSeq; 11 10 12 11 #[doc(hidden)] 13 - #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)] 12 + #[derive(Clone, Copy, Debug, PartialEq, Eq)] 14 13 pub struct Hex; 15 - #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)] 14 + #[derive(Clone, Copy, Debug, PartialEq, Eq)] 16 15 #[doc(hidden)] 17 16 pub struct Array; 18 17 19 18 /// An object ID that can serialized as a hex-string or an array of integers. 20 19 /// 21 20 /// This only exists because knotserver uses both representations. 22 - #[derive(Clone, Hash, Eq)] 21 + #[derive(Clone, Eq)] 23 22 pub struct ObjectId<E = Hex> { 24 23 inner: gix_hash::ObjectId, 25 24 enc: PhantomData<E>, ··· 47 46 inner: gix_hash::ObjectId::null(gix_hash::Kind::Sha1), 48 47 enc: PhantomData, 49 48 } 49 + } 50 + } 51 + 52 + impl<E> hash::Hash for ObjectId<E> { 53 + fn hash<H: hash::Hasher>(&self, state: &mut H) { 54 + self.inner.hash(state); 50 55 } 51 56 } 52 57 ··· 136 129 } 137 130 138 131 impl<'de> Visitor<'de> for Hex { 139 - type Value = ObjectId<Hex>; 132 + type Value = ObjectId<Self>; 140 133 141 134 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { 142 135 formatter.write_str("commit hash") ··· 161 154 } 162 155 163 156 impl<'de> Visitor<'de> for Array { 164 - type Value = ObjectId<Array>; 157 + type Value = ObjectId<Self>; 165 158 166 159 fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { 167 160 formatter.write_str("commit hash")
+1
crates/gordian-lexicon/src/sh_tangled/knot.rs
··· 47 47 } 48 48 49 49 impl<'a> Member<'a> { 50 + #[must_use] 50 51 pub fn new(subject: &'a Did, domain: &'a str, created_at: OffsetDateTime) -> Self { 51 52 Self { 52 53 subject: subject.into(),