error[E0599]: no method named `init` found for unit type `()` in the current scope
404Dev-404 opened this issue · 1 comments
I tried following the test part of the Rust OSDev Tutorial but when i try using serial_port.init(); I get this error.
error[E0599]: no method named `init` found for unit type `()` in the current scope
--> src/serial.rs:9:21
|
9 | serial_port.init();
| ^^^^ method not found in `()`
I am using uart_16550 version 0.2.0
I don't know if this is the right place.
Looks like you did not create the serial_port variable in the right way, as it seems to be of type ()? Maybe you have an accidental semicolon somewhere, e.g.:
let mut serial_port = unsafe {
SerialPort::new(SERIAL_IO_PORT); // remove this `;`, otherwise the result type is `()`
};I don't know if this is the right place.
Asking here is fine!
I think this should solve your issue, so I'm going to close this issue. If you still have problems, let us know!