Skip to content

Commit

Permalink
Run cargo clippy --fix for latest lints. (#713)
Browse files Browse the repository at this point in the history
  • Loading branch information
obi1kenobi authored Dec 10, 2024
1 parent 84995c4 commit 4bd9a8d
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions demo-hytradboi/src/pagers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl<'a> CratesPager<'a> {
}
}

impl<'a> Pager for CratesPager<'a> {
impl Pager for CratesPager<'_> {
type Item = Crate;

fn get_page(&mut self, page: usize) -> PagerOutput<Self::Item> {
Expand Down Expand Up @@ -58,7 +58,7 @@ impl<'a> WorkflowsPager<'a> {
}
}

impl<'a> Pager for WorkflowsPager<'a> {
impl Pager for WorkflowsPager<'_> {
type Item = RepoWorkflow;

fn get_page(&mut self, page: usize) -> PagerOutput<Self::Item> {
Expand Down
2 changes: 1 addition & 1 deletion trustfall/examples/weather/metar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ where
{
struct TypeDeserializer;

impl<'de> Visitor<'de> for TypeDeserializer {
impl Visitor<'_> for TypeDeserializer {
type Value = Option<bool>;

fn expecting(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
Expand Down
10 changes: 5 additions & 5 deletions trustfall_core/src/interpreter/hints/candidates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl<T: Clone> CandidateValue<T> {
}
}

impl<'a, T: Clone> CandidateValue<Cow<'a, T>> {
impl<T: Clone> CandidateValue<Cow<'_, T>> {
pub(super) fn into_owned(self) -> CandidateValue<T> {
match self {
CandidateValue::Impossible => CandidateValue::Impossible,
Expand All @@ -87,7 +87,7 @@ impl<'a, T: Clone> CandidateValue<Cow<'a, T>> {
}
}

impl<'a, T: Clone + PartialEq> PartialEq<CandidateValue<&T>> for CandidateValue<Cow<'a, T>> {
impl<T: Clone + PartialEq> PartialEq<CandidateValue<&T>> for CandidateValue<Cow<'_, T>> {
fn eq(&self, other: &CandidateValue<&T>) -> bool {
match (self, other) {
(CandidateValue::Impossible, CandidateValue::Impossible) => true,
Expand All @@ -102,7 +102,7 @@ impl<'a, T: Clone + PartialEq> PartialEq<CandidateValue<&T>> for CandidateValue<
}
}

impl<'a, T: Clone + PartialEq> PartialEq<CandidateValue<T>> for CandidateValue<Cow<'a, T>> {
impl<T: Clone + PartialEq> PartialEq<CandidateValue<T>> for CandidateValue<Cow<'_, T>> {
fn eq(&self, other: &CandidateValue<T>) -> bool {
match (self, other) {
(CandidateValue::Impossible, CandidateValue::Impossible) => true,
Expand Down Expand Up @@ -298,7 +298,7 @@ impl NullableValue for &FieldValue {
}
}

impl<'a> NullableValue for Cow<'a, FieldValue> {
impl NullableValue for Cow<'_, FieldValue> {
fn is_null(&self) -> bool {
match self {
Cow::Borrowed(v) => v.is_null(),
Expand Down Expand Up @@ -333,7 +333,7 @@ impl<T: Clone> Range<&T> {
}
}

impl<'a, T: Clone> Range<Cow<'a, T>> {
impl<T: Clone> Range<Cow<'_, T>> {
fn into_owned(self) -> Range<T> {
let start = self.start.map(|b| b.into_owned());
let end = self.end.map(|b| b.into_owned());
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/ir/types/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ impl<'de> Deserialize<'de> for Type {
{
struct TypeDeserializer;

impl<'de> Visitor<'de> for TypeDeserializer {
impl Visitor<'_> for TypeDeserializer {
type Value = Type;

fn expecting(&self, formatter: &mut Formatter<'_>) -> std::fmt::Result {
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/schema/adapter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl<'a> SchemaVertex<'a> {
}
}

impl<'a> Typename for SchemaVertex<'a> {
impl Typename for SchemaVertex<'_> {
#[inline(always)]
fn typename(&self) -> &'static str {
match self {
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/serialization/deserializers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ pub struct FieldValueDeserializer {
value: FieldValue,
}

impl<'de> de::IntoDeserializer<'de, Error> for FieldValue {
impl de::IntoDeserializer<'_, Error> for FieldValue {
type Deserializer = FieldValueDeserializer;

fn into_deserializer(self) -> Self::Deserializer {
Expand Down
2 changes: 1 addition & 1 deletion trustfall_core/src/serialization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ impl TryIntoStruct for BTreeMap<Arc<str>, FieldValue> {
}
}

impl<'a> TryIntoStruct for &'a crate::ir::EdgeParameters {
impl TryIntoStruct for &crate::ir::EdgeParameters {
type Error = deserializers::Error;

fn try_into_struct<S: DeserializeOwned>(self) -> Result<S, deserializers::Error> {
Expand Down

0 comments on commit 4bd9a8d

Please sign in to comment.