$ cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.09s
Running unittests src/lib.rs (target/debug/deps/zabbix_api-4e0bec763865bf2f)
running 11 tests
test client::v6::tests::create_host_group_and_host ... ok
test client::v6::tests::get_api_info ... ok
test client::v6::tests::get_host_groups_test ... ok
test client::v6::tests::create_item ... ok
test client::v6::tests::create_web_scenario ... ok
test client::v6::tests::get_hosts_test ... ok
test client::v6::tests::get_triggers_test ... ok
test client::v6::tests::create_trigger ... ok
test client::v6::tests::session_should_be_returned ... ok
test client::v6::tests::get_webscenarios_test ... ok
test client::v6::tests::raw_api_call_test ... ok
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
Doc-tests zabbix-api
running 1 test
test src/client/v6/mod.rs - client::v6::ZabbixApiV6Client::get_hosts (line 225) ... FAILED
failures:
---- src/client/v6/mod.rs - client::v6::ZabbixApiV6Client::get_hosts (line 225) stdout ----
error[E0277]: the ? operator can only be used in a function that returns Result or Option (or another type that implements FromResidual)
--> src/client/v6/mod.rs:248:57
--------------------------------------------- this function should return Result or Option to accept ?
...
26
let session = client.get_auth_session("Admin", "zabbix")?;
^ cannot use the ? operator in a function that returns ()
= help: the trait FromResidual<Result<Infallible, ZabbixApiError>> is not implemented for ()
error[E0277]: the ? operator can only be used in a function that returns Result or Option (or another type that implements FromResidual)
--> src/client/v6/mod.rs:249:49
$ pwd ~learnzabbix/zabbix-api-rs $ git log -1 commit d5fe2f41030a28459c814c365f958109e93b4d0f (HEAD -> main, origin/main, origin/HEAD) Author: Eugene Lebedev eugene.0x90@gmail.com Date: Fri Jan 26 13:58:18 2024 +0300
$ cargo test Finished test [unoptimized + debuginfo] target(s) in 0.09s Running unittests src/lib.rs (target/debug/deps/zabbix_api-4e0bec763865bf2f)
running 11 tests test client::v6::tests::create_host_group_and_host ... ok test client::v6::tests::get_api_info ... ok test client::v6::tests::get_host_groups_test ... ok test client::v6::tests::create_item ... ok test client::v6::tests::create_web_scenario ... ok test client::v6::tests::get_hosts_test ... ok test client::v6::tests::get_triggers_test ... ok test client::v6::tests::create_trigger ... ok test client::v6::tests::session_should_be_returned ... ok test client::v6::tests::get_webscenarios_test ... ok test client::v6::tests::raw_api_call_test ... ok
test result: ok. 11 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s
Doc-tests zabbix-api
running 1 test test src/client/v6/mod.rs - client::v6::ZabbixApiV6Client::get_hosts (line 225) ... FAILED
failures:
?
operator can only be used in a function that returnsResult
orOption
(or another type that implementsFromResidual
) --> src/client/v6/mod.rs:248:57Result
orOption
to accept?
... 26?
operator in a function that returns()
= help: the trait
FromResidual<Result<Infallible, ZabbixApiError>>
is not implemented for()
?
operator can only be used in a function that returnsResult
orOption
(or another type that implementsFromResidual
) --> src/client/v6/mod.rs:249:49Result
orOption
to accept?
... 27?
operator in a function that returns()
= help: the trait
FromResidual<Result<Infallible, ZabbixApiError>>
is not implemented for()
error: aborting due to 2 previous errors
For more information about this error, try
rustc --explain E0277
. Couldn't compile the test.failures: src/client/v6/mod.rs - client::v6::ZabbixApiV6Client::get_hosts (line 225)
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.33s
error: doctest failed, to rerun pass
--doc
$