Skip to content

Commit fa03ca8

Browse files
fixup! Abstract out utilities from FilesystemPersister
1 parent d224f04 commit fa03ca8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lightning-persister/src/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub(crate) trait DiskWriteable {
88
fn write_to_file(&self, writer: &mut fs::File) -> Result<(), std::io::Error>;
99
}
1010

11-
fn get_full_filepath(filepath: String, filename: String) -> String {
11+
pub(crate) fn get_full_filepath(filepath: String, filename: String) -> String {
1212
let mut path = PathBuf::from(filepath);
1313
path.push(filename);
1414
path.to_str().unwrap().to_string()
@@ -42,6 +42,7 @@ pub(crate) fn write_to_file(path: String, filename: String, data: &dyn DiskWrite
4242
Ok(())
4343
}
4444

45+
#[cfg(test)]
4546
mod tests {
4647
use super::{DiskWriteable, get_full_filepath, write_to_file};
4748
use std::fs;

0 commit comments

Comments
 (0)