Skip to content

Conversation

@baloo
Copy link
Member

@baloo baloo commented Dec 15, 2022

This introduces the two new traits to go from a ref object to an owned object as discussed in #796

closes #796

@baloo
Copy link
Member Author

baloo commented Dec 15, 2022

Guess I'll need to gate those to v1.65 since I'm making use of GAT (didn't even realize that)

@tarcieri
Copy link
Member

MSRV bump to 1.65 seems aggressive but probably fine as 1.66 will be out momentarily and it will still be several months before these crates are released

@baloo
Copy link
Member Author

baloo commented Dec 15, 2022

I think I like the rustversion macro (https://github.com/dtolnay/rustversion) a lot for that.
The OwnerToRef is gated for >=1.65 but we retain the 1.60 MSRV just without the trait.

@baloo
Copy link
Member Author

baloo commented Dec 15, 2022

I like the situation though:
https://github.com/RustCrypto/formats/actions/runs/3701100883/jobs/6270113493#step:4:92

The syntax moved from (1.60)

    type Borrowed<'a>
        where
        T: 'a,
    = Option<T::Borrowed<'a>>;

to (at least 1.65)

type Borrowed<'a> = Option<T::Borrowed<'a>> where T: 'a;

and it's now a warning.

@baloo baloo force-pushed the baloo/owned-api/ref-to-owned branch from 3c3d3a6 to ae22f5f Compare December 15, 2022 04:56
@tarcieri
Copy link
Member

I’m fine with bumping the MSRV outright. I’d prefer to avoid additional complexity just to preserve an arbitrary MSRV.

@tarcieri
Copy link
Member

@baloo can you rebase?

@baloo baloo force-pushed the baloo/owned-api/ref-to-owned branch from efe08f5 to 8334d10 Compare December 17, 2022 20:56
@tarcieri tarcieri merged commit 3389f86 into RustCrypto:master Dec 17, 2022
@tarcieri
Copy link
Member

D'oh, got the MSRV wrong in the commit message. Mea culpa.

@baloo baloo deleted the baloo/owned-api/ref-to-owned branch December 18, 2022 03:18
@tarcieri tarcieri mentioned this pull request Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants