fn finish(ih: &mut InitialHandler) {
    assert!(ih.info.is_some());

    // Enable compression if necessary
    let compression_threshold = ih.config.io.compression_threshold;
    if compression_threshold > 0 {
        enable_compression(ih, compression_threshold);
    }

    let info = ih.info.as_ref().unwrap();

    // Send Login Success
    let login_success = LoginSuccess::new(
        info.uuid.to_hyphenated_ref().to_string(),
        info.username.clone(),
    );
    send_packet(ih, login_success);
    ih.action_queue.push(Action::SetStage(PacketStage::Play));
    ih.action_queue
        .push(Action::JoinGame(ih.info.clone().unwrap()));
}
/// Terminates the login process, sending Set Compression (if necessary)
/// and Login Success.
///
/// Before calling this function, it is expected that:
/// * `info` is set to a valid value
/// * Encryption has been enabled, if necessary
/// * All other login processes have already run
Terminates the login process, sending Set Compression (if necessary)
and Login Success.

Before calling this function, it is expected that:
`info` is set to a valid value
Encryption has been enabled, if necessary
All other login processes have already run
Terminates the login process sending Set Compression ( if necessary ) and Login Success . Before calling this function it is expected that : ` info ` is set to a valid value Encryption has been enabled if necessary All other login processes have already run
fn finish(ih: &mut InitialHandler) {
    assert!(ih.info.is_some());
    // Enable compression if necessary
    let compression_threshold = ih.config.io.compression_threshold;
    if compression_threshold > 0 {
        enable_compression(ih, compression_threshold);
    }
    let info = ih.info.as_ref().unwrap();
    // Send Login Success
    let login_success = LoginSuccess::new(
        info.uuid.to_hyphenated_ref().to_string(),
        info.username.clone(),
    );
    send_packet(ih, login_success);
    ih.action_queue.push(Action::SetStage(PacketStage::Play));
    ih.action_queue
        .push(Action::JoinGame(ih.info.clone().unwrap()));
}
fn finish ( ih : & mut InitialHandler ) { assert ! ( ih info is_some ( ) ) ; // Enable compression if necessary let compression_threshold = ih . config . io . compression_threshold ; if compression_threshold > 0 { enable_compression ( ih , compression_threshold ) ; } let info = ih . info . as_ref ( ) . unwrap ( ) ; // Send Login Success let login_success = LoginSuccess :: new ( info . uuid . to_hyphenated_ref ( ) . to_string ( ) , info . username . clone ( ) , ) ; send_packet ( ih , login_success ) ; ih . action_queue . push ( Action :: SetStage ( PacketStage :: Play ) ) ; ih . action_queue . push ( Action :: JoinGame ( ih . info . clone ( ) . unwrap ( ) ) ) ; }
Terminates the login process, sending Set Compression (if necessary)
and Login Success.
Terminates the login process sending Set Compression ( if necessary ) and Login Success .
ih
&mut InitialHandler
ih
&mut InitialHandler