Mercurial > public > mercurial-scm > hg
diff rust/hg-cpython/src/revlog.rs @ 52158:f2eab4967bfc
rust-index: return an error on a bad index header
This is more idiomatic and allows us to better handle the problem later.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Thu, 10 Oct 2024 10:38:10 +0200 |
parents | 3e135e79b7f7 |
children | 7346f93be7a4 |
line wrap: on
line diff
--- a/rust/hg-cpython/src/revlog.rs Thu Oct 17 15:22:38 2024 +0200 +++ b/rust/hg-cpython/src/revlog.rs Thu Oct 10 10:38:10 2024 +0200 @@ -632,8 +632,7 @@ hg::index::Index::new( bytes, IndexHeader::parse(&header.to_be_bytes()) - .expect("default header is broken") - .unwrap(), + .expect("default header is broken"), ) .map_err(|e| { revlog_error_with_msg(py, e.to_string().as_bytes())