Skip to content

Commit

Permalink
chore: update actions and remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Fyko committed May 6, 2024
1 parent 236c330 commit e08edab
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:

- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5

- name: Run Clippy
working-directory: book
run: mdbook build

- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-pages-artifact@v3
with:
path: book/book

Expand All @@ -48,4 +48,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: cargo make cov-ci

- name: Upload coverage data to codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
Expand Down
15 changes: 6 additions & 9 deletions scyllax-cli/src/migrator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::{
borrow::Cow,
fmt::Display,
fs::ReadDir,
path::{Path, PathBuf},
sync::Arc,
Expand All @@ -18,13 +19,9 @@ use crate::model::{DeleteByVersion, MigrationQueries, UpsertMigration};

/// A marker struct provided to the [`Migrator`] to indicate that it should run up migrations.
pub struct UpMigration;
trait UpMigrationExt {}
impl UpMigrationExt for UpMigration {}

/// A marker struct provided to the [`Migrator`] to indicate that it should run down migrations.
pub struct DownMigration;
trait DownMigrationExt {}
impl DownMigrationExt for DownMigration {}

#[async_trait]
pub trait MigrationMode {
Expand Down Expand Up @@ -251,11 +248,11 @@ impl<K: MigrationMode> TryFrom<Cow<'_, str>> for MigrationFolder<K> {
}
}

impl<K: MigrationMode> ToString for MigrationFolder<K> {
/// Convert the migration folder to a string, which is the version and description joined by an
/// underscore.
fn to_string(&self) -> String {
format!("{}_{}", self.version, self.description.replace(' ', "_"))
/// Convert the migration folder to a string, which is the version and description joined by an
/// underscore.
impl<K: MigrationMode> Display for MigrationFolder<K> {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}_{}", self.version, self.description.replace(' ', "_"))
}
}

Expand Down

0 comments on commit e08edab

Please sign in to comment.