Skip to content

Commit e08edab

Browse files
committed
chore: update actions and remove unused code
1 parent 236c330 commit e08edab

3 files changed

Lines changed: 10 additions & 13 deletions

File tree

.github/workflows/book.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ jobs:
2424

2525
- name: Setup Pages
2626
id: pages
27-
uses: actions/configure-pages@v4
27+
uses: actions/configure-pages@v5
2828

2929
- name: Run Clippy
3030
working-directory: book
3131
run: mdbook build
3232

3333
- name: Upload Pages Artifact
34-
uses: actions/upload-pages-artifact@v2
34+
uses: actions/upload-pages-artifact@v3
3535
with:
3636
path: book/book
3737

@@ -48,4 +48,4 @@ jobs:
4848
steps:
4949
- name: Deploy to GitHub Pages
5050
id: deployment
51-
uses: actions/deploy-pages@v3
51+
uses: actions/deploy-pages@v4

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
run: cargo make cov-ci
5959

6060
- name: Upload coverage data to codecov
61-
uses: codecov/codecov-action@v3
61+
uses: codecov/codecov-action@v4
6262
env:
6363
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6464
with:

scyllax-cli/src/migrator.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use std::{
22
borrow::Cow,
3+
fmt::Display,
34
fs::ReadDir,
45
path::{Path, PathBuf},
56
sync::Arc,
@@ -18,13 +19,9 @@ use crate::model::{DeleteByVersion, MigrationQueries, UpsertMigration};
1819

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

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

2926
#[async_trait]
3027
pub trait MigrationMode {
@@ -251,11 +248,11 @@ impl<K: MigrationMode> TryFrom<Cow<'_, str>> for MigrationFolder<K> {
251248
}
252249
}
253250

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

0 commit comments

Comments
 (0)