Skip to content

Commit

Permalink
Merge pull request #82 from drdo/minor-cleanup
Browse files Browse the repository at this point in the history
Minor cleanup
  • Loading branch information
drdo authored Feb 6, 2025
2 parents e37dd53 + c58c2c5 commit 84f322d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/cache/mod.rs → src/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,19 +557,19 @@ impl<'a> Migrator<'a> {

fn migrate_none_to_v0(conn: &mut Connection) -> Result<(), rusqlite::Error> {
let tx = conn.transaction()?;
tx.execute_batch(include_str!("sql/none_to_v0.sql"))?;
tx.execute_batch(include_str!("cache/sql/none_to_v0.sql"))?;
tx.commit()
}

fn migrate_none_to_v1(conn: &mut Connection) -> Result<(), rusqlite::Error> {
let tx = conn.transaction()?;
tx.execute_batch(include_str!("sql/none_to_v1.sql"))?;
tx.execute_batch(include_str!("cache/sql/none_to_v1.sql"))?;
tx.commit()
}

fn migrate_v0_to_v1(conn: &mut Connection) -> Result<(), rusqlite::Error> {
let tx = conn.transaction()?;
tx.execute_batch(include_str!("sql/v0_to_v1.sql"))?;
tx.execute_batch(include_str!("cache/sql/v0_to_v1.sql"))?;
tx.commit()
}

Expand Down
2 changes: 1 addition & 1 deletion src/cache/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Iterator for PathGenerator {
new_prefix.push(Utf8PathBuf::from(child.to_string()));
self.state.push((depth, prefix, child + 1));
if depth == 1 {
break (Some(new_prefix));
break Some(new_prefix);
} else {
self.state.push((depth - 1, new_prefix, 0));
}
Expand Down

0 comments on commit 84f322d

Please sign in to comment.