Building with cargo build -r --features hyperv currently results in the error below (apparently since the hv variable is set to the hyperv::present function and not its return value).
error[E0308]: mismatched types
--> src/main.rs:72:63
|
72 | SnpGuestCmd::Report(args) => report::get_report(args, hv),
| ------------------ ^^ expected `bool`, found fn item
| |
| arguments to this function are incorrect
|
::: src/hyperv/mod.rs:24:1
|
24 | pub fn present() -> bool {
| ------------------------ function `present` defined here
|
= note: expected type `bool`
found fn item `fn() -> bool {present}`
note: function defined here
--> src/report.rs:103:8
|
103 | pub fn get_report(args: ReportArgs, hv: bool) -> Result<()> {
| ^^^^^^^^^^ --------
help: use parentheses to call this function
|
72 | SnpGuestCmd::Report(args) => report::get_report(args, hv()),
| ++
Building with
cargo build -r --features hyperv
currently results in the error below (apparently since thehv
variable is set to thehyperv::present
function and not its return value).