Skip to content

How to migrate #23

Closed Answered by minshao
sehkone asked this question in Q&A
Apr 21, 2023 · 4 comments · 9 replies
Discussion options

You must be logged in to vote

It should work, and the following might be simpler~

  let migration: Vec<(_, _, fn(_, _) -> Result<_, _>)> = vec![(
        VersionReq::parse(">=0.2,<0.5.0-alpha").expect("valid version requirement"),
        Version::parse("0.4.0").expect("valid version"),
        migrate_0_2_to_0_3,
    ), (
       VersionReq::parse(format!(">={version_from},<{version_to_next}")).expect("valid version requirement"),
       Version::parse(format!("{version_to}")).expect("valid version"),
       migrate_0_4_to_0_5,
 )];

Replies: 4 comments 9 replies

Comment options

You must be logged in to vote
5 replies
@sehkone
Comment options

sehkone Apr 21, 2023
Maintainer Author

@sehkone
Comment options

sehkone Apr 21, 2023
Maintainer Author

@minshao
Comment options

minshao Apr 21, 2023
Collaborator

Answer selected by sehkone
@sehkone
Comment options

sehkone Apr 21, 2023
Maintainer Author

@minshao
Comment options

minshao Apr 21, 2023
Collaborator

Comment options

sehkone
Apr 24, 2023
Maintainer Author

You must be logged in to vote
1 reply
@minshao
Comment options

minshao Apr 24, 2023
Collaborator

Comment options

sehkone
Apr 24, 2023
Maintainer Author

You must be logged in to vote
1 reply
@minshao
Comment options

minshao Apr 24, 2023
Collaborator

Comment options

sehkone
Apr 24, 2023
Maintainer Author

You must be logged in to vote
2 replies
@minshao
Comment options

minshao Apr 24, 2023
Collaborator

@sehkone
Comment options

sehkone Apr 24, 2023
Maintainer Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants