Skip to content

Commit 8e80267

Browse files
committed
Move v21 wallet module into subdirectory
In preparation for adding v21 wallet RPCs move the module into a subdirectory and split out the into module. Move only, no code changes.
1 parent ec52fad commit 8e80267

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

types/src/v21/wallet/into.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SPDX-License-Identifier: CC0-1.0
2+
3+
use super::UnloadWallet;
4+
use crate::model;
5+
6+
impl UnloadWallet {
7+
/// Converts version specific type to a version nonspecific, more strongly typed type.
8+
pub fn into_model(self) -> model::UnloadWallet {
9+
model::UnloadWallet { warnings: vec![self.warning] }
10+
}
11+
}

types/src/v21/wallet.rs renamed to types/src/v21/wallet/mod.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
//!
55
//! Types for methods found under the `== Wallet ==` section of the API docs.
66
7-
use serde::{Deserialize, Serialize};
7+
mod into;
88

9-
use crate::model;
9+
use serde::{Deserialize, Serialize};
1010

1111
/// Result of the JSON-RPC method `unloadwallet`.
1212
///
@@ -20,10 +20,3 @@ pub struct UnloadWallet {
2020
/// Warning messages, if any, related to unloading the wallet.
2121
pub warning: String,
2222
}
23-
24-
impl UnloadWallet {
25-
/// Converts version specific type to a version nonspecific, more strongly typed type.
26-
pub fn into_model(self) -> model::UnloadWallet {
27-
model::UnloadWallet { warnings: vec![self.warning] }
28-
}
29-
}

0 commit comments

Comments
 (0)