Skip to content

Commit 88fef50

Browse files
server/migration: Remove unnessary name parameter
1 parent 04ee821 commit 88fef50

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

server/src/migration.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ pub enum PendingMigration {
2828

2929
impl PendingMigration {
3030
/// Attempt to migrate this keyring with the provided secret
31-
pub async fn migrate(&self, name: &str, secret: &Secret) -> Result<UnlockedKeyring, Error> {
31+
pub async fn migrate(&self, secret: &Secret) -> Result<UnlockedKeyring, Error> {
3232
match self {
33-
Self::V0 { path, .. } => {
33+
Self::V0 { path, name, .. } => {
3434
tracing::debug!("Migrating v0 keyring: {}", name);
3535

3636
let unlocked = UnlockedKeyring::open(name, secret.clone()).await?;
@@ -50,7 +50,7 @@ impl PendingMigration {
5050
Ok(unlocked)
5151
}
5252
#[cfg(feature = "kwallet_migration")]
53-
Self::KWallet { path, .. } => {
53+
Self::KWallet { path, name, .. } => {
5454
tracing::debug!("Migrating KWallet keyring: {}", name);
5555

5656
// Parse KWallet file in blocking task

server/src/service/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ impl Service {
261261
);
262262

263263
// Attempt migration with the provided secret (no locks held)
264-
match migration.migrate(migration_name, &secret).await {
264+
match migration.migrate(&secret).await {
265265
Ok(unlocked_keyring) => {
266266
tracing::info!(
267267
"Successfully migrated '{}' during unlock",
@@ -710,7 +710,7 @@ impl Service {
710710
"Attempting immediate migration of KWallet keyring '{}'",
711711
name
712712
);
713-
match migration.migrate(name, secret).await {
713+
match migration.migrate(secret).await {
714714
Ok(unlocked) => {
715715
tracing::info!("Successfully migrated KWallet keyring '{}' to oo7", name);
716716
discovered.push((
@@ -1291,7 +1291,7 @@ impl Service {
12911291
for (name, migration) in pending.iter() {
12921292
tracing::debug!("Attempting to migrate pending keyring: {}", name);
12931293

1294-
match migration.migrate(name, secret).await {
1294+
match migration.migrate(secret).await {
12951295
Ok(unlocked) => {
12961296
let label = migration.label();
12971297
let alias = migration.alias();

0 commit comments

Comments
 (0)