Skip to content

Commit

Permalink
update clippy for 1.78 (#129)
Browse files Browse the repository at this point in the history
* update clippy for 1.78
* update codecov action with environment secret
  • Loading branch information
gftea committed May 16, 2024
1 parent e2e62a9 commit 713e316
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ jobs:

codecov:
runs-on: ubuntu-latest
environment: ci
steps:
- name: Checkout sources
uses: actions/checkout@v4
Expand All @@ -67,7 +68,9 @@ jobs:
run: RUST_LOG=trace cargo llvm-cov --all-features --lcov --output-path ./lcov.info

- name: Report to codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
files: ./lcov.info
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[workspace]

members = ["amqprs", "amqp_serde", "examples", "benchmarks"]

rust-version = "1.56"
resolver = "2"

# [profile.bench]
Expand Down
16 changes: 8 additions & 8 deletions amqp_serde/src/ser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ where
self.serialize_unit()
}

fn serialize_some<T: ?Sized>(self, value: &T) -> Result<Self::Ok>
fn serialize_some<T>(self, value: &T) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
value.serialize(self)
}
Expand All @@ -161,23 +161,23 @@ where
}

// serialize only contained value
fn serialize_newtype_struct<T: ?Sized>(self, _name: &'static str, value: &T) -> Result<Self::Ok>
fn serialize_newtype_struct<T>(self, _name: &'static str, value: &T) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
value.serialize(self)
}

// serialize variant name and contained value
fn serialize_newtype_variant<T: ?Sized>(
fn serialize_newtype_variant<T>(
self,
_name: &'static str,
_variant_index: u32,
variant: &'static str,
value: &T,
) -> Result<Self::Ok>
where
T: serde::Serialize,
T: serde::Serialize + ?Sized,
{
variant.serialize(&mut *self)?;
value.serialize(&mut *self)
Expand Down Expand Up @@ -252,9 +252,9 @@ where

type Error = Error;

fn serialize_element<T: ?Sized>(&mut self, value: &T) -> Result<()>
fn serialize_element<T>(&mut self, value: &T) -> Result<()>
where
T: Serialize,
T: Serialize + ?Sized,
{
value.serialize(&mut **self)
}
Expand Down
1 change: 1 addition & 0 deletions amqprs/src/api/connection.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#![allow(clippy::assigning_clones)] // Need to support `1.56.0` but `clone_into` is stable since `1.63.0`
//! Implementation of AMQP_0-9-1's Connection class compatible with RabbitMQ.
//!
//! It provides [APIs][`Connection`] to manage an AMQP `Connection`.
Expand Down

0 comments on commit 713e316

Please sign in to comment.