Skip to content

Commit 1e09072

Browse files
committed
doc(Chd): clarify doc on parent behaviour
1 parent f7c5e68 commit 1e09072

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

chd-rs/src/chdfile.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ impl<F: Read + Seek> Chd<F> {
3838
///
3939
/// If the CHD file does not require a parent, and a parent is provided, returns
4040
/// [`Error::InvalidParameter`](crate::Error::InvalidParameter).
41-
42-
/// If no parent CHD is provided and the file requires a CHD, the parent will not be
43-
/// validated immediately. However, calls to [`read_hunk_in`](crate::Hunk::read_hunk_in) will
44-
/// fail with [`Error::RequiresParent`](crate::Error::RequiresParent).
41+
/// If no parent CHD is provided and the file requires a parent, then the presence of the parent
42+
/// will not be immediately violated. However, calls to [`read_hunk_in`](crate::Hunk::read_hunk_in)
43+
/// will fail with [`Error::RequiresParent`](crate::Error::RequiresParent) when a hunk is read that
44+
/// refers to the parent CHD.
4545
pub fn open(mut file: F, parent: Option<Box<Chd<F>>>) -> Result<Chd<F>> {
4646
let header = Header::try_read_header(&mut file)?;
4747
// No point in checking writable because traits are read only.

0 commit comments

Comments
 (0)