Rust and DHT22 - reciving pin status

Hello

Im "occasional " programmer who is trying to learn some new things with my HiFive1 rev b board.

Im using led_gpio example from here, there is no example how to read data from pin and basing on what is there im trying to read data from my DHT22 sensor.

Here is code:

#![no_std]
#![no_main]

/*
* Basic blinking external LED using GPIO pin example.
* WARNING: requires a LED to be wired to physical PIN9 with at least
* a 320 Ohm resistor in series similar to
* https://create.arduino.cc/projecthub/rowan07/make-a-simple-led-circuit-ce8308
*/

extern crate panic_halt;

use hifive1::hal::delay::Sleep;
use hifive1::hal::prelude::*;
use hifive1::hal::DeviceResources;
use hifive1::{pin, sprintln};
use riscv_rt::entry;

#[entry]
fn main() -> ! {
    let dr = DeviceResources::take().unwrap();
    let p = dr.peripherals;
    let pins = dr.pins;

    // let pins = dr.pins;

    // Configure clocks
    let clocks = hifive1::clock::configure(p.PRCI, p.AONCLK, 320.mhz().into());

    let mut eled = pin!(pins, dig9).into_output();

    // GPIO PIN1 -> DIG9 physical on board (both hifive1 and hifive1-revB)
    



    hifive1::stdout::configure(
        p.UART0,
        pin!(pins, uart0_tx),
        pin!(pins, uart0_rx),
        115_200.bps(),
        clocks,
    );

    // get the local interrupts struct
    let clint = dr.core_peripherals.clint;

    // get the sleep struct
    let mut sleep = Sleep::new(clint.mtimecmp, clocks);

    const PERIOD: u32 = 1000; // 1s
    sprintln!("loop");
    loop {
        
        eled.set_low().unwrap();
        sleep.delay_ms(20);
        eled.set_high().unwrap();
        sleep.delay_ms(35);
        sprintln!("sent");
        
        let dr = DeviceResources::take().unwrap();

        let pins = dr.pins;
        let mut eled = pin!(pins, dig9).into_floating_input();

        sprintln!("recive");
        let recive = eled.is_high().unwrap();
        sprintln!("{}", recive);

        // // sleep for 1s
        sleep.delay_ms(PERIOD);
    }
}

Problem is it looks like it stuck after “sent” output to console and i have no idea why it is happening.
If i understand correctly those if_high/is_low methods i need to read status with one of it on pin with some IF condition and basing on it create input in some variable? How to properly read pin status?

EDIT:
I made some additional tests and im reading pin status properly so problem will be when swapping pin configuration from output to input. How to make it properly in loop?

I found out how to change pin status and here is working code for it:

loop {
        
        eled.set_low().unwrap();
        sleep.delay_ms(20);
        eled.set_high().unwrap();
        sleep.delay_ms(35);
        sprintln!("sent");
        
       
        let mut eled_input = eled.into_floating_input();

        sprintln!("recive");
        loop {
            let recive = eled_input.is_high().unwrap();
            sprintln!("{}", recive);
            sleep.delay_ms(30);
        }

        // // sleep for 1s
        eled = eled_input.into_output();
        sleep.delay_ms(PERIOD);
    }

But DHT22 doesn’t look its answering, im getting only high status on pin, any idea what could be wrong. I have connected DHT22 data pin with 10k resistor to 5V.