Merge pull request #592 from joshuachp/push-ymtywtzromku #913
Annotations
1 error and 29 warnings
|
cargo test (stable)
The process '/home/runner/.cargo/bin/cargo' failed with exit code 127
|
|
cargo test (stable)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
cargo test (stable)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
cargo test (stable)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
cargo test (stable)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
|
the `Err`-variant returned from this function is very large:
src/main.rs#L45
warning: the `Err`-variant returned from this function is very large
--> src/main.rs:45:20
|
45 | async fn main() -> Result<(), DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
|
= help: try reducing the size of `edgehog_device_runtime::error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<edgehog_device_runtime::error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/config.rs#L26
warning: the `Err`-variant returned from this function is very large
--> src/config.rs:26:6
|
26 | ) -> Result<DeviceManagerOptions, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the `Err`-variant is at least 176 bytes
|
= help: try reducing the size of `edgehog_device_runtime::error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<edgehog_device_runtime::error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `#[warn(clippy::result_large_err)]` on by default
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/wifi_scan.rs#L35
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/wifi_scan.rs:35:35
|
35 | pub fn get_wifi_scan_results() -> Result<Vec<WifiScanResult>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/system_status.rs#L34
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/system_status.rs:34:31
|
34 | pub fn get_system_status() -> Result<SystemStatus, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/system_info.rs#L26
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/system_info.rs:26:29
|
26 | pub fn get_system_info() -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/storage_usage.rs#L35
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/storage_usage.rs:35:31
|
35 | pub fn get_storage_usage() -> Result<HashMap<String, DiskUsage>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/runtime_info.rs#L26
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/runtime_info.rs:26:30
|
26 | pub fn get_runtime_info() -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/os_info.rs#L50
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/os_info.rs:50:31
|
50 | fn parse_os_info(os: &str) -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/os_info.rs#L26
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/os_info.rs:26:25
|
26 | pub fn get_os_info() -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
unused "map closure" when calling `Result::map_or_else` value:
src/telemetry/net_if_properties.rs#L113
warning: unused "map closure" when calling `Result::map_or_else` value
--> src/telemetry/net_if_properties.rs:113:41
|
113 | let supported_networks_interfaces = get_supported_network_interfaces().map_or_else(
| _________________________________________^
114 | | |err| {
115 | | warn!("{err}");
116 | | Default::default()
117 | | },
118 | | |d| d,
119 | | );
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_result_map_or_else
= note: `#[warn(clippy::unnecessary_result_map_or_else)]` on by default
help: consider using `unwrap_or_else`
|
113 ~ let supported_networks_interfaces = get_supported_network_interfaces().unwrap_or_else(|err| {
114 + warn!("{err}");
115 + Default::default()
116 ~ });
|
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/net_if_properties.rs#L51
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/net_if_properties.rs:51:42
|
51 | fn get_supported_network_interfaces() -> Result<Vec<NetworkInterfaceProperties>, DeviceManagerError>
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
direct implementation of `ToString`:
src/telemetry/net_if_properties.rs#L33
warning: direct implementation of `ToString`
--> src/telemetry/net_if_properties.rs:33:1
|
33 | / impl ToString for TechnologyType {
34 | | fn to_string(&self) -> String {
35 | | match self {
36 | | TechnologyType::Ethernet => "Ethernet",
... |
42 | | }
| |_^
|
= help: prefer implementing `Display` instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_trait_impl
= note: `#[warn(clippy::to_string_trait_impl)]` on by default
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/hardware_info.rs#L27
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/hardware_info.rs:27:31
|
27 | pub fn get_hardware_info() -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
`flatten()` will run forever if the iterator repeatedly produces an `Err`:
src/telemetry/base_image.rs#L29
warning: `flatten()` will run forever if the iterator repeatedly produces an `Err`
--> src/telemetry/base_image.rs:29:21
|
29 | Ok(file.lines().flatten().fold(HashMap::new(), get_from_iter))
| ^^^^^^^^^ help: replace with: `map_while(Result::ok)`
|
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
--> src/telemetry/base_image.rs:29:8
|
29 | Ok(file.lines().flatten().fold(HashMap::new(), get_from_iter))
| ^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok
= note: `#[warn(clippy::lines_filter_map_ok)]` on by default
|
|
the `Err`-variant returned from this function is very large:
src/telemetry/base_image.rs#L27
warning: the `Err`-variant returned from this function is very large
--> src/telemetry/base_image.rs:27:28
|
27 | pub fn get_base_image() -> Result<HashMap<String, AstarteType>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/repository/mod.rs#L33
warning: the `Err`-variant returned from this function is very large
--> src/repository/mod.rs:33:24
|
33 | fn clear(&self) -> Result<(), DeviceManagerError>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/repository/mod.rs#L31
warning: the `Err`-variant returned from this function is very large
--> src/repository/mod.rs:31:23
|
31 | fn read(&self) -> Result<T, DeviceManagerError>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/repository/mod.rs#L30
warning: the `Err`-variant returned from this function is very large
--> src/repository/mod.rs:30:35
|
30 | fn write(&self, value: &T) -> Result<(), DeviceManagerError>;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/power_management.rs#L25
warning: the `Err`-variant returned from this function is very large
--> src/power_management.rs:25:20
|
25 | pub fn reboot() -> Result<(), DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
redundant guard:
src/ota/ota_handler.rs#L209
warning: redundant guard
--> src/ota/ota_handler.rs:209:31
|
209 | Ok(ota_status) if ota_status == OtaStatus::Idle => Ok(()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
209 - Ok(ota_status) if ota_status == OtaStatus::Idle => Ok(()),
209 + Ok(OtaStatus::Idle) => Ok(()),
|
|
|
unneeded `return` statement:
src/ota/ota_handle.rs#L471
warning: unneeded `return` statement
--> src/ota/ota_handle.rs:471:13
|
471 | return OtaStatus::Rebooting(ota_request);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
471 - return OtaStatus::Rebooting(ota_request);
471 + OtaStatus::Rebooting(ota_request)
|
|
|
the `Err`-variant returned from this function is very large:
src/data/astarte_message_hub_node.rs#L260
warning: the `Err`-variant returned from this function is very large
--> src/data/astarte_message_hub_node.rs:260:6
|
260 | ) -> Result<Vec<Vec<u8>>, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
|
|
the `Err`-variant returned from this function is very large:
src/data/astarte_device_sdk_lib.rs#L156
warning: the `Err`-variant returned from this function is very large
--> src/data/astarte_device_sdk_lib.rs:156:6
|
156 | ) -> Result<String, DeviceManagerError> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
::: src/error.rs:32:5
|
32 | AstarteError(#[from] astarte_device_sdk::AstarteError),
| ------------------------------------------------------ the variant `AstarteError` contains at least 144 bytes
...
65 | TonicStatus(#[from] tonic::Status),
| ---------------------------------- the largest variant contains at least 176 bytes
|
= help: try reducing the size of `error::DeviceManagerError`, for example by boxing large elements or replacing it with `Box<error::DeviceManagerError>`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
= note: `#[warn(clippy::result_large_err)]` on by default
|
|
variable does not need to be mutable:
src/telemetry/mod.rs#L120
warning: variable does not need to be mutable
--> src/telemetry/mod.rs:120:25
|
120 | let mut default_task = rwlock_default_task;
| ----^^^^^^^^^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
|
unexpected `cfg` condition name: `tarpaulin`:
src/lib.rs#L635
warning: unexpected `cfg` condition name: `tarpaulin`
--> src/lib.rs:635:11
|
635 | #[cfg(not(tarpaulin))]
| ^^^^^^^^^
|
= help: expected names are: `docsrs`, `feature`, and `test` and 31 more
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tarpaulin)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tarpaulin)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
|