File tree 1 file changed +0
-26
lines changed
1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change @@ -71,29 +71,3 @@ pub trait TransactionalWrite: Write {
71
71
/// Persist the previously made changes.
72
72
fn commit ( & mut self ) -> std:: io:: Result < ( ) > ;
73
73
}
74
-
75
- // TODO: Use this generic impl once we have Node<K>
76
- //impl<T> KVStorePersister for T
77
- //where T: KVStore
78
- //{
79
- // fn persist<W: Writeable>(&self, prefixed_key: &str, object: &W) -> lightning::io::Result<()> {
80
- // let msg = format!("Could not persist data for key {}.", prefixed_key);
81
- // let dest_file = PathBuf::from_str(prefixed_key).map_err(|_| {
82
- // lightning::io::Error::new(lightning::io::ErrorKind::InvalidInput, msg.clone())
83
- // })?;
84
- //
85
- // let parent_directory = dest_file.parent().ok_or(lightning::io::Error::new(
86
- // lightning::io::ErrorKind::InvalidInput,
87
- // msg.clone(),
88
- // ))?;
89
- // let namespace = parent_directory.display().to_string();
90
- //
91
- // let dest_without_namespace = dest_file
92
- // .strip_prefix(&namespace)
93
- // .map_err(|_| lightning::io::Error::new(lightning::io::ErrorKind::InvalidInput, msg))?;
94
- // let key = dest_without_namespace.display().to_string();
95
- // let mut writer = self.write(&namespace, &key)?;
96
- // object.write(&mut writer)?;
97
- // Ok(writer.commit()?)
98
- // }
99
- //}
You can’t perform that action at this time.
0 commit comments