Extract the [`Metadata`] of a single [`StoredCommit`] from the given reader. Note that this decodes the commit due to checksum verification. Like [`StoredCommit::decode`], this method returns `None` if the reader is at EOF already.
(reader: R)
| 365 | /// Like [`StoredCommit::decode`], this method returns `None` if the reader |
| 366 | /// is at EOF already. |
| 367 | pub fn extract<R: io::Read>(reader: R) -> io::Result<Option<Self>> { |
| 368 | StoredCommit::decode(reader).map(|maybe_commit| maybe_commit.map(Self::from)) |
| 369 | } |
| 370 | } |
| 371 | |
| 372 | impl From<StoredCommit> for Metadata { |
no test coverage detected