fn update_header(
        f: &mut File,
        header_1: Result<Header>,
        header_2: Result<Header>,
        guid: u128,
    ) -> Result<(Header, Header)> {
        let (header_no, current_header) = VhdxHeader::current_header(header_1, header_2)?;

        match header_no {
            HeaderNo::First => {
                let other_header =
                    Header::update_header(f, &current_header, true, guid, HEADER_2_START)?;
                Ok((current_header, other_header))
            }
            HeaderNo::Second => {
                let other_header =
                    Header::update_header(f, &current_header, true, guid, HEADER_1_START)?;
                Ok((other_header, current_header))
            }
        }
    }
/// This takes two headers and update the noncurrent header with the
/// current one. Returns both headers as a tuple sequenced the way it was
/// received from the parameter list.
This takes two headers and update the noncurrent header with the
current one. Returns both headers as a tuple sequenced the way it was
received from the parameter list.
This takes two headers and update the noncurrent header with the current one . Returns both headers as a tuple sequenced the way it was received from the parameter list .
fn update_header(
        f: &mut File,
        header_1: Result<Header>,
        header_2: Result<Header>,
        guid: u128,
    ) -> Result<(Header, Header)> {
        let (header_no, current_header) = VhdxHeader::current_header(header_1, header_2)?;
        match header_no {
            HeaderNo::First => {
                let other_header =
                    Header::update_header(f, &current_header, true, guid, HEADER_2_START)?;
                Ok((current_header, other_header))
            }
            HeaderNo::Second => {
                let other_header =
                    Header::update_header(f, &current_header, true, guid, HEADER_1_START)?;
                Ok((other_header, current_header))
            }
        }
    }
fn update_header ( f : & mut File , header_1 : Result < Header > , header_2 : Result < Header > , guid : u128 , ) -> Result < ( Header , Header ) > { let ( header_no , current_header ) = VhdxHeader :: current_header ( header_1 , header_2 ) ? ; match header_no { HeaderNo :: First => { let other_header = Header :: update_header ( f , & current_header , true , guid , HEADER_2_START ) ? ; Ok ( ( current_header , other_header ) ) } HeaderNo :: Second => { let other_header = Header :: update_header ( f , & current_header , true , guid , HEADER_1_START ) ? ; Ok ( ( other_header , current_header ) ) } } }
This takes two headers and update the noncurrent header with the
current one.
This takes two headers and update the noncurrent header with the current one .
f
&mut File
header_1
Result<Header>
header_2
Result<Header>
guid
u128
f
&mut File
header_1
Result<Header>
header_2
Result<Header>
guid
u128