Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix nightly build and lint #285

Merged
merged 2 commits into from
Dec 17, 2024
Merged
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
2 changes: 1 addition & 1 deletion src/containers/indexed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct IndexedConsignment<'c, const TRANSFER: bool> {
witness_idx: BTreeMap<XWitnessId, &'c XPubWitness>,
}

impl<'c, const TRANSFER: bool> Deref for IndexedConsignment<'c, TRANSFER> {
impl<const TRANSFER: bool> Deref for IndexedConsignment<'_, TRANSFER> {
type Target = Consignment<TRANSFER>;

fn deref(&self) -> &Self::Target { self.consignment }
Expand Down
6 changes: 3 additions & 3 deletions src/interface/contractum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use super::{

struct ArgMapDisplay<'a>(&'a ArgMap);

impl<'a> Display for ArgMapDisplay<'a> {
impl Display for ArgMapDisplay<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
for (i, (name, occ)) in self.0.iter().enumerate() {
if i > 0 {
Expand Down Expand Up @@ -96,7 +96,7 @@ impl<'a> OpIfaceDisplay<'a> {
}
}

impl<'a> Display for OpIfaceDisplay<'a> {
impl Display for OpIfaceDisplay<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
if !self.errors.is_empty() {
write!(f, "\t\terrors: ")?;
Expand Down Expand Up @@ -159,7 +159,7 @@ impl<'a> IfaceDisplay<'a> {
}
}

impl<'a> Display for IfaceDisplay<'a> {
impl Display for IfaceDisplay<'_> {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
fn sugar(f: &mut Formatter<'_>, required: bool, multiple: bool) -> fmt::Result {
match (required, multiple) {
Expand Down
2 changes: 1 addition & 1 deletion src/persistence/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1129,7 +1129,7 @@ pub struct MemContractWriter<'mem> {
contract: &'mem mut MemContractState,
}

impl<'mem> ContractStateWrite for MemContractWriter<'mem> {
impl ContractStateWrite for MemContractWriter<'_> {
type Error = MemError;

/// # Panics
Expand Down
4 changes: 2 additions & 2 deletions src/persistence/stock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -505,12 +505,12 @@
Ok(self.stash.geneses()?.map(ContractInfo::with))
}

#[allow(clippy::multiple_bound_locations)]
#[allow(clippy::multiple_bound_locations, clippy::type_complexity)]
pub fn contracts_by<'a, C: IfaceClass + 'a>(
&'a self,
) -> Result<
impl Iterator<
Item = <C::Wrapper<H::ContractRead<'_>> as IfaceWrapper<H::ContractRead<'_>>>::Info,
Item = <C::Wrapper<H::ContractRead<'a>> as IfaceWrapper<H::ContractRead<'a>>>::Info,

Check warning on line 513 in src/persistence/stock.rs

View check run for this annotation

Codecov / codecov/patch

src/persistence/stock.rs#L513

Added line #L513 was not covered by tests
> + 'a,
StockError<S, H, P>,
> {
Expand Down