]> git.bitcoin.ninja Git - rust-lightning/blobdiff - lightning-persister/src/lib.rs
Enforce no missing docs in all crates (+ add docs that were missing)
[rust-lightning] / lightning-persister / src / lib.rs
index 0151b1e464ea6af8559e147ef19084331485f8f9..3db95f35a955e3b46113761eae91e26b105c1086 100644 (file)
@@ -1,3 +1,8 @@
+//! Utilities that handle persisting Rust-Lightning data to disk via standard filesystem APIs.
+
+#![deny(broken_intra_doc_links)]
+#![deny(missing_docs)]
+
 mod util;
 
 extern crate lightning;
@@ -72,6 +77,7 @@ impl FilesystemPersister {
                }
        }
 
+       /// Get the directory which was provided when this persister was initialized.
        pub fn get_data_dir(&self) -> String {
                self.path_to_channel_data.clone()
        }
@@ -124,7 +130,7 @@ impl FilesystemPersister {
                                if contents.is_err() { return Err(ChannelMonitorUpdateErr::PermanentFailure); }
 
                                if let Ok((_, loaded_monitor)) =
-                                       <(Option<BlockHash>, ChannelMonitor<Keys::Signer>)>::read(&mut Cursor::new(&contents.unwrap()), keys) {
+                                       <(BlockHash, ChannelMonitor<Keys::Signer>)>::read(&mut Cursor::new(&contents.unwrap()), keys) {
                                                res.insert(OutPoint { txid: txid.unwrap(), index: index.unwrap() }, loaded_monitor);
                                        } else {
                                                return Err(ChannelMonitorUpdateErr::PermanentFailure);