Skip to content

Should we care about msrv lint warnings for 1.0? #1743

Closed

Description

@benalleng

These lint warnings occur on our msrv dev shell.

error: large size difference between variants
   --> payjoin/src/core/receive/v2/session.rs:196:1
    |
196 | / pub enum SessionEvent {
197 | |     Created(SessionContext),
    | |     ----------------------- the largest variant contains at least 536 bytes
198 | |     RetrievedOriginalPayload { original: OriginalPayload, reply_key: Option<crate::HpkePubli
cKey>...
    | |     ----------------------------------------------------------------------------------------
------- the second-largest variant contains at least 65 bytes
199 | |     CheckedBroadcastSuitability(),
...   |
211 | |     Closed(SessionOutcome),
212 | | }
    | |_^ the entire enum is at least 0 bytes
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#
large_enum_variant
    = note: `-D clippy::large-enum-variant` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::large_enum_variant)]`
help: consider boxing the large fields to reduce the total size of the enum
    |
197 |     Created(Box<SessionContext>),
    |             ~~~~~~~~~~~~~~~~~~~
error: the following explicit lifetimes could be elided: 'a
  --> payjoin/src/core/url.rs:91:6
   |
91 | impl<'a> PathSegmentsMut<'a> {
   |      ^^                  ^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#n
eedless_lifetimes
   = note: `-D clippy::needless-lifetimes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_lifetimes)]`
help: elide the lifetimes
   |
91 - impl<'a> PathSegmentsMut<'a> {
91 + impl PathSegmentsMut<'_> {
   |
error: the following explicit lifetimes could be elided: 'a
   --> payjoin/src/core/url.rs:103:6
    |
103 | impl<'a> Drop for PathSegmentsMut<'a> {
    |      ^^                           ^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#
needless_lifetimes
help: elide the lifetimes
    |
103 - impl<'a> Drop for PathSegmentsMut<'a> {
103 + impl Drop for PathSegmentsMut<'_> {
    |

Activity

  1. changed the title [-]Should we care about msrv lint warnings?[/-] [+]Should we care about msrv lint warnings for 1.0?[/+] on Jul 15, 2026
  2. benalleng commented on Jul 17, 2026

    @benalleng
    CollaboratorAuthor

    There is a TODO above the large_enum_variant clippy for the receiver's SessionEvent enum regarding SessionContext being large but this only exists because of a inaccurate measure for the rest of the variants in our msrv 1.85.0. In the SessionEvent enum some variants like FinalizedProposal would be estimated to be extremely small because bitcoin::Psbt was improperly measured as size 0. In nightly these estimations are more accurate further described here #1744 (comment) and the need for a Box<> is not necessary long term for the receiver SessionEvent::SessionContext enum variant. the TODO can be safely removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions