We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 515cb7a commit f8124e8Copy full SHA for f8124e8
src/utils.rs
@@ -194,14 +194,14 @@ mod tests {
194
}
195
196
197
- /// Create a wallet file with optional wallet content.
198
- /// Creates empty wallet file if content is None.
199
- fn create_wallet(wallet_path: &Path, content: Option<&str>) {
+ /// Create a wallet file with optional wallet data; the data is written to the file if provided.
+ /// The data does not have to be a valid JSON.
+ fn create_wallet(wallet_path: &Path, data: Option<&str>) {
200
if !wallet_path.exists() {
201
fs::File::create(wallet_path).unwrap();
202
203
- if let Some(content) = content {
204
- fs::write(wallet_path, content).unwrap();
+ if let Some(data) = data {
+ fs::write(wallet_path, data).unwrap();
205
206
207
0 commit comments