Match on version constants instead of number literals

This commit is contained in:
Joscha 2025-05-02 01:27:03 +02:00
parent 2c5ff584db
commit 0baf79cb8c
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ fn migrate(dir: &LockedDataDir) -> anyhow::Result<()> {
loop {
let version = dir.read_version().context("failed to migrate data dir")?;
match version {
0 => v0::migrate(dir),
v0::VERSION => v0::migrate(dir),
_ => break Ok(()),
}
.with_context(|| format!("failed to migrate data dir from version {version}"))?;