Skip to content

Commit f8124e8

Browse files
committed
create_wallet updated param name; content -> data; updated description
1 parent 515cb7a commit f8124e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/utils.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,14 @@ mod tests {
194194
}
195195
}
196196

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>) {
197+
/// Create a wallet file with optional wallet data; the data is written to the file if provided.
198+
/// The data does not have to be a valid JSON.
199+
fn create_wallet(wallet_path: &Path, data: Option<&str>) {
200200
if !wallet_path.exists() {
201201
fs::File::create(wallet_path).unwrap();
202202
}
203-
if let Some(content) = content {
204-
fs::write(wallet_path, content).unwrap();
203+
if let Some(data) = data {
204+
fs::write(wallet_path, data).unwrap();
205205
}
206206
}
207207

0 commit comments

Comments
 (0)