[INFO] fetching crate ble-data-struct 0.2.1... [INFO] linting ble-data-struct-0.2.1 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate ble-data-struct 0.2.1 into /workspace/builds/worker-0-tc1/source [INFO] started tweaking crates.io crate ble-data-struct 0.2.1 [INFO] finished tweaking crates.io crate ble-data-struct 0.2.1 [INFO] tweaked toml for crates.io crate ble-data-struct 0.2.1 written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ble-data-struct 0.2.1 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 26 packages to latest compatible versions [INFO] [stderr] Adding windows v0.54.0 (available: v0.62.2) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a73802a4078e3cb002ccabe5b916f4fdbffa509643da6019a009f25f7bffb60e [INFO] running `Command { std: "docker" "start" "-a" "a73802a4078e3cb002ccabe5b916f4fdbffa509643da6019a009f25f7bffb60e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a73802a4078e3cb002ccabe5b916f4fdbffa509643da6019a009f25f7bffb60e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a73802a4078e3cb002ccabe5b916f4fdbffa509643da6019a009f25f7bffb60e", kill_on_drop: false }` [INFO] [stdout] a73802a4078e3cb002ccabe5b916f4fdbffa509643da6019a009f25f7bffb60e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] d36f81eea520b53926c3d4ff68a3eea0207832e4eb9a6e517c26e6146d7bd936 [INFO] running `Command { std: "docker" "start" "-a" "d36f81eea520b53926c3d4ff68a3eea0207832e4eb9a6e517c26e6146d7bd936", kill_on_drop: false }` [INFO] [stderr] Compiling windows_x86_64_gnu v0.52.6 [INFO] [stderr] Checking uuid v1.22.0 [INFO] [stderr] Checking windows-targets v0.52.6 [INFO] [stderr] Checking windows-result v0.1.2 [INFO] [stderr] Checking windows-core v0.54.0 [INFO] [stderr] Checking windows v0.54.0 [INFO] [stderr] Checking ble-data-struct v0.2.1 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_types/big_info.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | num_bis: num_bis, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `num_bis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:175:45 [INFO] [stdout] | [INFO] [stdout] 175 | ch_m[i / 8] = ch_m[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:294:53 [INFO] [stdout] | [INFO] [stdout] 294 | u8_vec[i / 8] = u8_vec[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/data_types/big_info.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | num_bis: num_bis, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `num_bis` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:175:45 [INFO] [stdout] | [INFO] [stdout] 175 | ch_m[i / 8] = ch_m[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/data_types/le_supported_features.rs:1336:53 [INFO] [stdout] | [INFO] [stdout] 1336 | u8_vec[i / 8] = u8_vec[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (i % 8)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | / /// let result1 = ListOf16BitServiceSolicitationUUIDs::new(&uuids); [INFO] [stdout] 123 | | [INFO] [stdout] 124 | | /// let length = uuid_bytes.len() as u8 + 1; [INFO] [stdout] 125 | | /// let mut data: Vec = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 131 | | /// assert_eq!(data, into_data); [INFO] [stdout] 132 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 139 | fn into(self) -> Vec { [INFO] [stdout] | ------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the documentation should include the empty lines include them in the comment [INFO] [stdout] | [INFO] [stdout] 123 + /// [INFO] [stdout] 124 | /// let length = uuid_bytes.len() as u8 + 1; [INFO] [stdout] ... [INFO] [stdout] 128 | /// data.append(&mut uuid_bytes.clone()); [INFO] [stdout] 129 + /// [INFO] [stdout] 130 | /// let into_data: Vec = result1.into(); [INFO] [stdout] 131 | /// assert_eq!(data, into_data); [INFO] [stdout] 132 + /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty lines after doc comment [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:122:5 [INFO] [stdout] | [INFO] [stdout] 122 | / /// let result1 = ListOf16BitServiceSolicitationUUIDs::new(&uuids); [INFO] [stdout] 123 | | [INFO] [stdout] 124 | | /// let length = uuid_bytes.len() as u8 + 1; [INFO] [stdout] 125 | | /// let mut data: Vec = Vec::new(); [INFO] [stdout] ... | [INFO] [stdout] 131 | | /// assert_eq!(data, into_data); [INFO] [stdout] 132 | | [INFO] [stdout] | |_^ [INFO] [stdout] ... [INFO] [stdout] 139 | fn into(self) -> Vec { [INFO] [stdout] | ------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty lines are unintentional, remove them [INFO] [stdout] help: if the documentation should include the empty lines include them in the comment [INFO] [stdout] | [INFO] [stdout] 123 + /// [INFO] [stdout] 124 | /// let length = uuid_bytes.len() as u8 + 1; [INFO] [stdout] ... [INFO] [stdout] 128 | /// data.append(&mut uuid_bytes.clone()); [INFO] [stdout] 129 + /// [INFO] [stdout] 130 | /// let into_data: Vec = result1.into(); [INFO] [stdout] 131 | /// assert_eq!(data, into_data); [INFO] [stdout] 132 + /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/advertising_interval.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for AdvertisingInterval { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [`AdvertisingInterval`]. [INFO] [stdout] ... [INFO] [stdout] 128 | /// ``` [INFO] [stdout] 129 ~ fn from(val: AdvertisingInterval) -> Self { [INFO] [stdout] 130 | let mut data: Vec = Vec::new(); [INFO] [stdout] 131 ~ data.push(val.length); [INFO] [stdout] 132 ~ data.push(AdvertisingInterval::data_type()); [INFO] [stdout] 133 ~ data.append(&mut val.advertising_interval.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/advertising_interval.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return data; [INFO] [stdout] 134 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/advertising_interval_long.rs:149:1 [INFO] [stdout] | [INFO] [stdout] 149 | impl Into> for AdvertisingIntervalLong { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 149 ~ impl From for Vec { [INFO] [stdout] 150 | /// Create [`Vec`] from [`AdvertisingIntervalLong`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: AdvertisingIntervalLong) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(AdvertisingIntervalLong::data_type()); [INFO] [stdout] 193 ~ if val.is_u32 { [INFO] [stdout] 194 ~ data.append(&mut val.advertising_interval_long.to_le_bytes().to_vec()); [INFO] [stdout] 195 | } else { [INFO] [stdout] 196 ~ data.append(&mut val.advertising_interval_long.to_le_bytes()[..3].to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/advertising_interval_long.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 198 - return data; [INFO] [stdout] 198 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/appearance.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | impl Into> for Appearance { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 120 ~ impl From for Vec { [INFO] [stdout] 121 | /// Create [`Vec`] from [`Appearance`]. [INFO] [stdout] ... [INFO] [stdout] 144 | /// ``` [INFO] [stdout] 145 ~ fn from(val: Appearance) -> Self { [INFO] [stdout] 146 | let mut data: Vec = Vec::new(); [INFO] [stdout] 147 ~ data.push(val.length); [INFO] [stdout] 148 ~ data.push(Appearance::data_type()); [INFO] [stdout] 149 ~ data.append(&mut val.appearance.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/appearance.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return data; [INFO] [stdout] 150 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (22/7) [INFO] [stdout] --> src/data_types/big_info.rs:206:5 [INFO] [stdout] | [INFO] [stdout] 206 | / pub fn new( [INFO] [stdout] 207 | | big_offset: u16, [INFO] [stdout] 208 | | big_offset_units: bool, [INFO] [stdout] 209 | | iso_interval: u16, [INFO] [stdout] ... | [INFO] [stdout] 228 | | gskd: Option<[u8; 16]>, [INFO] [stdout] 229 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/data_types/big_info.rs:231:28 [INFO] [stdout] | [INFO] [stdout] 231 | length: if let None = giv { 34 } else { 58 }, [INFO] [stdout] | -------^^^^------ help: try: `if giv.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/big_info.rs:550:1 [INFO] [stdout] | [INFO] [stdout] 550 | impl Into> for BigInfo { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 550 ~ impl From for Vec { [INFO] [stdout] 551 | /// Create [`Vec`] from [`BigInfo`]. [INFO] [stdout] ... [INFO] [stdout] 680 | /// ``` [INFO] [stdout] 681 ~ fn from(val: BigInfo) -> Self { [INFO] [stdout] 682 | let mut data: Vec = Vec::new(); [INFO] [stdout] 683 ~ data.push(val.length); [INFO] [stdout] 684 ~ data.push(BigInfo::data_type()); [INFO] [stdout] 685 ~ data.push(val.big_offset as u8); [INFO] [stdout] 686 ~ let mut value: u8 = (val.big_offset >> 8) as u8; [INFO] [stdout] 687 ~ if val.big_offset_units { [INFO] [stdout] 688 | value |= 0b01000000; [INFO] [stdout] 689 | } [INFO] [stdout] 690 ~ value |= (val.iso_interval << 7) as u8; [INFO] [stdout] 691 | data.push(value); [INFO] [stdout] 692 | [INFO] [stdout] 693 ~ data.push((val.iso_interval >> 1) as u8); [INFO] [stdout] 694 | [INFO] [stdout] 695 ~ value = (val.iso_interval >> 9) as u8; [INFO] [stdout] 696 ~ value |= val.num_bis << 3; [INFO] [stdout] 697 | data.push(value); [INFO] [stdout] 698 | [INFO] [stdout] 699 ~ value = val.nse; [INFO] [stdout] 700 ~ value |= val.bn << 5; [INFO] [stdout] 701 | data.push(value); [INFO] [stdout] 702 | [INFO] [stdout] 703 ~ data.push(val.sub_interval as u8); [INFO] [stdout] 704 ~ data.push((val.sub_interval >> 8) as u8); [INFO] [stdout] 705 ~ value = (val.sub_interval >> 16) as u8; [INFO] [stdout] 706 ~ value |= val.pto << 4; [INFO] [stdout] 707 | data.push(value); [INFO] [stdout] 708 | [INFO] [stdout] 709 ~ data.push(val.bis_spacing as u8); [INFO] [stdout] 710 ~ data.push((val.bis_spacing >> 8) as u8); [INFO] [stdout] 711 ~ value = (val.bis_spacing >> 16) as u8; [INFO] [stdout] 712 ~ value |= val.irc << 4; [INFO] [stdout] 713 | data.push(value); [INFO] [stdout] 714 | [INFO] [stdout] 715 ~ data.push(val.max_pdu); [INFO] [stdout] 716 ~ data.push(val.rfu); [INFO] [stdout] 717 | [INFO] [stdout] 718 ~ data.append(&mut val.seed_access_address.to_le_bytes().to_vec()); [INFO] [stdout] 719 | [INFO] [stdout] 720 ~ data.push(val.sdu_interval as u8); [INFO] [stdout] 721 ~ data.push((val.sdu_interval >> 8) as u8); [INFO] [stdout] 722 ~ value = (val.sdu_interval >> 16) as u8; [INFO] [stdout] 723 ~ value |= (val.max_sdu << 4) as u8; [INFO] [stdout] 724 | data.push(value); [INFO] [stdout] 725 ~ data.push((val.max_sdu >> 4) as u8); [INFO] [stdout] 726 | [INFO] [stdout] 727 ~ data.append(&mut val.base_crc_init.to_le_bytes().to_vec()); [INFO] [stdout] 728 | [INFO] [stdout] 729 ~ data.push(val.ch_m as u8); [INFO] [stdout] 730 ~ data.push((val.ch_m >> 8) as u8); [INFO] [stdout] 731 ~ data.push((val.ch_m >> 16) as u8); [INFO] [stdout] 732 ~ data.push((val.ch_m >> 24) as u8); [INFO] [stdout] 733 ~ value = (val.ch_m >> 32) as u8; [INFO] [stdout] 734 ~ value |= val.phy << 5; [INFO] [stdout] 735 | data.push(value); [INFO] [stdout] 736 | [INFO] [stdout] 737 ~ data.push(val.bis_payload_count as u8); [INFO] [stdout] 738 ~ data.push((val.bis_payload_count >> 8) as u8); [INFO] [stdout] 739 ~ data.push((val.bis_payload_count >> 16) as u8); [INFO] [stdout] 740 ~ data.push((val.bis_payload_count >> 24) as u8); [INFO] [stdout] 741 ~ value = (val.bis_payload_count >> 32) as u8; [INFO] [stdout] 742 ~ if val.framing { [INFO] [stdout] 743 | value |= 0b10000000; [INFO] [stdout] 744 | } [INFO] [stdout] 745 | data.push(value); [INFO] [stdout] 746 ~ match val.giv { [INFO] [stdout] 747 | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 748 | None => (), [INFO] [stdout] 749 | } [INFO] [stdout] 750 ~ match val.gskd { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/big_info.rs:754:9 [INFO] [stdout] | [INFO] [stdout] 754 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 754 - return data; [INFO] [stdout] 754 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/data_types/big_info.rs:746:9 [INFO] [stdout] | [INFO] [stdout] 746 | / match self.giv { [INFO] [stdout] 747 | | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 748 | | None => (), [INFO] [stdout] 749 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(x) = self.giv { data.append(&mut x.clone().to_vec()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/data_types/big_info.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | / match self.gskd { [INFO] [stdout] 751 | | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 752 | | None => (), [INFO] [stdout] 753 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(x) = self.gskd { data.append(&mut x.clone().to_vec()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/broadcast_code.rs:42:32 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn new(broadcast_code: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 ~ pub fn new(broadcast_code: &[u8]) -> Self { [INFO] [stdout] 43 | Self { [INFO] [stdout] 44 | length: 1 + broadcast_code.len() as u8, [INFO] [stdout] 45 ~ broadcast_code: broadcast_code.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/broadcast_code.rs:123:1 [INFO] [stdout] | [INFO] [stdout] 123 | impl Into> for BroadcastCode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 123 ~ impl From for Vec { [INFO] [stdout] 124 | /// Create [`Vec`] from [`BroadcastCode`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: BroadcastCode) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(BroadcastCode::data_type()); [INFO] [stdout] 193 ~ data.append(&mut val.broadcast_code.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/broadcast_code.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 194 - return data; [INFO] [stdout] 194 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:36:22 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(ch_m: &Vec, instant: u16) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - pub fn new(ch_m: &Vec, instant: u16) -> Self { [INFO] [stdout] 36 + pub fn new(ch_m: &[bool], instant: u16) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 112 | | data.push(x & 0b0000_0001 != 0); [INFO] [stdout] 113 | | data.push(x & 0b0000_0010 != 0); [INFO] [stdout] 114 | | data.push(x & 0b0000_0100 != 0); [INFO] [stdout] ... | [INFO] [stdout] 118 | | data.push(x & 0b0100_0000 != 0); [INFO] [stdout] 119 | | data.push(x & 0b1000_0000 != 0); [INFO] [stdout] | |________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:131:1 [INFO] [stdout] | [INFO] [stdout] 131 | impl Into> for ChannelMapUpdateIndication { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 131 ~ impl From for Vec { [INFO] [stdout] 132 | /// Create [`Vec`] from [`ChannelMapUpdateIndication`]. [INFO] [stdout] ... [INFO] [stdout] 167 | /// ``` [INFO] [stdout] 168 ~ fn from(val: ChannelMapUpdateIndication) -> Self { [INFO] [stdout] 169 | let mut data: Vec = Vec::new(); [INFO] [stdout] 170 ~ data.push(val.length); [INFO] [stdout] 171 ~ data.push(ChannelMapUpdateIndication::data_type()); [INFO] [stdout] 172 | let mut ch_m = [0u8; 5]; [INFO] [stdout] 173 ~ for (i, element) in val.ch_m.iter().enumerate() { [INFO] [stdout] 174 | if *element { [INFO] [stdout] ... [INFO] [stdout] 178 | data.append(&mut ch_m.to_vec()); [INFO] [stdout] 179 ~ data.append(&mut val.instant.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 180 - return data; [INFO] [stdout] 180 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:175:17 [INFO] [stdout] | [INFO] [stdout] 175 | ch_m[i / 8] = ch_m[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ch_m[i / 8] |= 1 << i % 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/class_of_device.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | impl Into> for ClassOfDevice { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 159 ~ impl From for Vec { [INFO] [stdout] 160 | /// Create [`Vec`] from [`ClassOfDevice`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: ClassOfDevice) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(ClassOfDevice::data_type()); [INFO] [stdout] 193 ~ data.push(val.class_of_device as u8); [INFO] [stdout] 194 ~ data.push((val.class_of_device >> 8) as u8); [INFO] [stdout] 195 ~ data.push((val.class_of_device >> 16) as u8); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/class_of_device.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 196 - return data; [INFO] [stdout] 196 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/class_of_device.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 191 | | data.push(self.length); [INFO] [stdout] 192 | | data.push(Self::data_type()); [INFO] [stdout] 193 | | data.push(self.class_of_device as u8); [INFO] [stdout] 194 | | data.push((self.class_of_device >> 8) as u8); [INFO] [stdout] 195 | | data.push((self.class_of_device >> 16) as u8); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for CompleteListOf128BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`CompleteListOf128BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 133 | /// ``` [INFO] [stdout] 134 ~ fn from(val: CompleteListOf128BitServiceUuids) -> Self { [INFO] [stdout] 135 | let mut data: Vec = Vec::new(); [INFO] [stdout] 136 ~ data.push(val.length); [INFO] [stdout] 137 ~ data.push(CompleteListOf128BitServiceUuids::data_type()); [INFO] [stdout] 138 | data.append( [INFO] [stdout] 139 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | impl Into> for CompleteListOf16BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 96 ~ impl From for Vec { [INFO] [stdout] 97 | /// Create [`Vec`] from [`CompleteListOf16BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 141 | /// ``` [INFO] [stdout] 142 ~ fn from(val: CompleteListOf16BitServiceUuids) -> Self { [INFO] [stdout] 143 | let mut data: Vec = Vec::new(); [INFO] [stdout] 144 ~ data.push(val.length); [INFO] [stdout] 145 ~ data.push(CompleteListOf16BitServiceUuids::data_type()); [INFO] [stdout] 146 | data.append( [INFO] [stdout] 147 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return data; [INFO] [stdout] 154 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:110:1 [INFO] [stdout] | [INFO] [stdout] 110 | impl Into> for CompleteListOf32BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 110 ~ impl From for Vec { [INFO] [stdout] 111 | /// Create [`Vec`] from [`CompleteListOf32BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 148 | /// ``` [INFO] [stdout] 149 ~ fn from(val: CompleteListOf32BitServiceUuids) -> Self { [INFO] [stdout] 150 | let mut data: Vec = Vec::new(); [INFO] [stdout] 151 ~ data.push(val.length); [INFO] [stdout] 152 ~ data.push(CompleteListOf32BitServiceUuids::data_type()); [INFO] [stdout] 153 | data.append( [INFO] [stdout] 154 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 161 - return data; [INFO] [stdout] 161 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/complete_local_name.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | length: complete_local_name.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `complete_local_name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_local_name.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | impl Into> for CompleteLocalName { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 80 ~ impl From for Vec { [INFO] [stdout] 81 | /// Create[`Vec`] from [`CompleteLocalName`]. [INFO] [stdout] ... [INFO] [stdout] 104 | /// ``` [INFO] [stdout] 105 ~ fn from(val: CompleteLocalName) -> Self { [INFO] [stdout] 106 | let mut data: Vec = Vec::new(); [INFO] [stdout] 107 ~ data.push(val.length); [INFO] [stdout] 108 ~ data.push(CompleteLocalName::data_type()); [INFO] [stdout] 109 ~ data.append(&mut val.complete_local_name.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_local_name.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return data; [INFO] [stdout] 110 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/data_types/data_type_parser.rs:1441:22 [INFO] [stdout] | [INFO] [stdout] 1441 | .map(|f| DataTypeParseResult::from(f)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DataTypeParseResult::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/encrypted_data.rs:38:47 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(randomizer: &[u8; 5], payload: &Vec, mic: [u8; 4]) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 ~ pub fn new(randomizer: &[u8; 5], payload: &[u8], mic: [u8; 4]) -> Self { [INFO] [stdout] 39 | Self { [INFO] [stdout] 40 | length: 10 + payload.len() as u8, [INFO] [stdout] 41 | randomizer: randomizer.clone(), [INFO] [stdout] 42 ~ payload: payload.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 5]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/encrypted_data.rs:41:25 [INFO] [stdout] | [INFO] [stdout] 41 | randomizer: randomizer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*randomizer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/encrypted_data.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | mic: mic.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `mic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/data_types/encrypted_data.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | let randomizer: [u8; 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `randomizer` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 90 ~ [INFO] [stdout] 91 ~ let randomizer: [u8; 5] = match value[2..7].try_into() { [INFO] [stdout] 92 ~ Ok(x) => x, [INFO] [stdout] 93 | Err(x) => return Err(x.to_string()), [INFO] [stdout] 94 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/data_types/encrypted_data.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let mic: [u8; 4]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `mic` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 95 ~ [INFO] [stdout] 96 ~ let mic: [u8; 4] = match value[value.len() - 4..].try_into() { [INFO] [stdout] 97 ~ Ok(x) => x, [INFO] [stdout] 98 | Err(x) => return Err(x.to_string()), [INFO] [stdout] 99 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/encrypted_data.rs:109:1 [INFO] [stdout] | [INFO] [stdout] 109 | impl Into> for EncryptedData { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 109 ~ impl From for Vec { [INFO] [stdout] 110 | /// Create [`Vec`] from [`EncryptedData`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: EncryptedData) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(EncryptedData::data_type()); [INFO] [stdout] 143 ~ data.append(&mut val.randomizer.clone().to_vec()); [INFO] [stdout] 144 ~ data.append(&mut val.payload.clone()); [INFO] [stdout] 145 ~ data.append(&mut val.mic.clone().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/encrypted_data.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/flags.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn new(flags: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 ~ pub fn new(flags: &[bool]) -> Self { [INFO] [stdout] 48 | Self { [INFO] [stdout] 49 | length: (flags.len() / 8 + 1) as u8, [INFO] [stdout] 50 ~ flags: flags.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.flags.get(0)` [INFO] [stdout] --> src/data_types/flags.rs:74:10 [INFO] [stdout] | [INFO] [stdout] 74 | *self.flags.get(0).unwrap_or(&false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.flags.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:270:21 [INFO] [stdout] | [INFO] [stdout] 270 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 271 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 272 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 273 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 277 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 278 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/flags.rs:286:1 [INFO] [stdout] | [INFO] [stdout] 286 | impl Into> for Flags { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 286 ~ impl From for Vec { [INFO] [stdout] 287 | /// Create [`Vec`] from [`Flags`]. [INFO] [stdout] ... [INFO] [stdout] 434 | /// ``` [INFO] [stdout] 435 ~ fn from(val: Flags) -> Self { [INFO] [stdout] 436 | let mut data: Vec = Vec::new(); [INFO] [stdout] 437 ~ data.push(val.length); [INFO] [stdout] 438 ~ data.push(Flags::data_type()); [INFO] [stdout] 439 | [INFO] [stdout] 440 ~ let mut flags: Vec = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/flags.rs:455:9 [INFO] [stdout] | [INFO] [stdout] 455 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 455 - return data; [INFO] [stdout] 455 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for IncompleteListOf128BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`IncompleteListOf128BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 134 | /// ``` [INFO] [stdout] 135 ~ fn from(val: IncompleteListOf128BitServiceUuids) -> Self { [INFO] [stdout] 136 | let mut data: Vec = Vec::new(); [INFO] [stdout] 137 ~ data.push(val.length); [INFO] [stdout] 138 ~ data.push(IncompleteListOf128BitServiceUuids::data_type()); [INFO] [stdout] 139 | data.append( [INFO] [stdout] 140 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 147 - return data; [INFO] [stdout] 147 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for IncompleteListOf16BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [`IncompleteListOf16BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: IncompleteListOf16BitServiceUuids) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(IncompleteListOf16BitServiceUuids::data_type()); [INFO] [stdout] 143 | data.append( [INFO] [stdout] 144 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 151 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return data; [INFO] [stdout] 151 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:36:23 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 39 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:111:1 [INFO] [stdout] | [INFO] [stdout] 111 | impl Into> for IncompleteListOf32BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 111 ~ impl From for Vec { [INFO] [stdout] 112 | /// Create [`Vec`] from [`IncompleteListOf32BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 149 | /// ``` [INFO] [stdout] 150 ~ fn from(val: IncompleteListOf32BitServiceUuids) -> Self { [INFO] [stdout] 151 | let mut data: Vec = Vec::new(); [INFO] [stdout] 152 ~ data.push(val.length); [INFO] [stdout] 153 ~ data.push(IncompleteListOf32BitServiceUuids::data_type()); [INFO] [stdout] 154 | data.append( [INFO] [stdout] 155 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return data; [INFO] [stdout] 162 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:158:1 [INFO] [stdout] | [INFO] [stdout] 158 | impl Into> for LeBluetoothDeviceAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 158 ~ impl From for Vec { [INFO] [stdout] 159 | /// Create [`Vec`] from [`LeBluetoothDeviceAddress`]. [INFO] [stdout] ... [INFO] [stdout] 185 | /// ``` [INFO] [stdout] 186 ~ fn from(val: LeBluetoothDeviceAddress) -> Self { [INFO] [stdout] 187 | let mut data: Vec = Vec::new(); [INFO] [stdout] 188 ~ data.push(val.length); [INFO] [stdout] 189 ~ data.push(LeBluetoothDeviceAddress::data_type()); [INFO] [stdout] 190 ~ data.append(&mut val.le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] 191 ~ data.push(u8::from(val.address_type)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 192 - return data; [INFO] [stdout] 192 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:190:26 [INFO] [stdout] | [INFO] [stdout] 190 | data.append(&mut self.le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.le_bluetooth_device_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_role.rs:250:1 [INFO] [stdout] | [INFO] [stdout] 250 | impl Into> for LeRole { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 250 ~ impl From for Vec { [INFO] [stdout] 251 | /// Create [`Vec`] from [LeRole]. [INFO] [stdout] ... [INFO] [stdout] 329 | /// ``` [INFO] [stdout] 330 ~ fn from(val: LeRole) -> Self { [INFO] [stdout] 331 | let mut data: Vec = Vec::new(); [INFO] [stdout] 332 ~ data.push(val.length); [INFO] [stdout] 333 ~ data.push(LeRole::data_type()); [INFO] [stdout] 334 ~ data.push(val.le_role); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_role.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 335 - return data; [INFO] [stdout] 335 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 332 | | data.push(self.length); [INFO] [stdout] 333 | | data.push(Self::data_type()); [INFO] [stdout] 334 | | data.push(self.le_role); [INFO] [stdout] | |________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_secure_connections_confirmation_value.rs:89:1 [INFO] [stdout] | [INFO] [stdout] 89 | impl Into> for LeSecureConnectionsConfirmationValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 89 ~ impl From for Vec { [INFO] [stdout] 90 | /// Create [`Vec`] from [`LeSecureConnectionsConfirmationValue`]. [INFO] [stdout] ... [INFO] [stdout] 119 | /// ``` [INFO] [stdout] 120 ~ fn from(val: LeSecureConnectionsConfirmationValue) -> Self { [INFO] [stdout] 121 | let mut data: Vec = Vec::new(); [INFO] [stdout] 122 ~ data.push(val.length); [INFO] [stdout] 123 ~ data.push(LeSecureConnectionsConfirmationValue::data_type()); [INFO] [stdout] 124 | data.append( [INFO] [stdout] 125 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_secure_connections_confirmation_value.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 130 - return data; [INFO] [stdout] 130 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_secure_connections_random_value.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | impl Into> for LeSecureConnectionsRandomValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 85 ~ impl From for Vec { [INFO] [stdout] 86 | /// Create [`Vec`] from [`LeSecureConnectionsRandomValue`]. [INFO] [stdout] ... [INFO] [stdout] 110 | /// ``` [INFO] [stdout] 111 ~ fn from(val: LeSecureConnectionsRandomValue) -> Self { [INFO] [stdout] 112 | let mut data: Vec = Vec::new(); [INFO] [stdout] 113 ~ data.push(val.length); [INFO] [stdout] 114 ~ data.push(LeSecureConnectionsRandomValue::data_type()); [INFO] [stdout] 115 | data.append( [INFO] [stdout] 116 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_secure_connections_random_value.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return data; [INFO] [stdout] 121 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/le_supported_features.rs:32:39 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new(le_supported_features: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 ~ pub fn new(le_supported_features: &[bool]) -> Self { [INFO] [stdout] 33 | Self { [INFO] [stdout] 34 | length: 1 + le_supported_features.len() as u8 / 8, [INFO] [stdout] 35 ~ le_supported_features: le_supported_features.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.le_supported_features.get(0)` [INFO] [stdout] --> src/data_types/le_supported_features.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | *self.le_supported_features.get(0).unwrap_or(&false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.le_supported_features.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_supported_features.rs:797:17 [INFO] [stdout] | [INFO] [stdout] 797 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 798 | | data.push(x & 0b0000_0001 != 0); [INFO] [stdout] 799 | | data.push(x & 0b0000_0010 != 0); [INFO] [stdout] 800 | | data.push(x & 0b0000_0100 != 0); [INFO] [stdout] ... | [INFO] [stdout] 804 | | data.push(x & 0b0100_0000 != 0); [INFO] [stdout] 805 | | data.push(x & 0b1000_0000 != 0); [INFO] [stdout] | |________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_supported_features.rs:816:1 [INFO] [stdout] | [INFO] [stdout] 816 | impl Into> for LeSupportedFeatures { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 816 ~ impl From for Vec { [INFO] [stdout] 817 | /// Create [`Vec`] from [`LeSupportedFeatures`]. [INFO] [stdout] ... [INFO] [stdout] 851 | /// ``` [INFO] [stdout] 852 ~ fn from(val: LeSupportedFeatures) -> Self { [INFO] [stdout] 853 | let mut data: Vec = Vec::new(); [INFO] [stdout] 854 ~ data.push(val.length); [INFO] [stdout] 855 ~ data.push(LeSupportedFeatures::data_type()); [INFO] [stdout] 856 ~ let mut le_supported_features: Vec = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_supported_features.rs:874:9 [INFO] [stdout] | [INFO] [stdout] 874 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 874 - return data; [INFO] [stdout] 874 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for ListOf128BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`ListOf128BitServiceSolicitationUUIDs`]. [INFO] [stdout] ... [INFO] [stdout] 133 | /// ``` [INFO] [stdout] 134 ~ fn from(val: ListOf128BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 135 | let mut data: Vec = Vec::new(); [INFO] [stdout] 136 ~ data.push(val.length); [INFO] [stdout] 137 ~ data.push(ListOf128BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 138 | data.append( [INFO] [stdout] 139 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for ListOf16BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [ListOf16BitServiceSolicitationUUIDs]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: ListOf16BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(ListOf16BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 143 | data.append( [INFO] [stdout] 144 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 151 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return data; [INFO] [stdout] 151 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:36:23 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 39 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:111:1 [INFO] [stdout] | [INFO] [stdout] 111 | impl Into> for ListOf32BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 111 ~ impl From for Vec { [INFO] [stdout] 112 | /// Create [`Vec`] from [`ListOf32BitServiceSolicitationUUIDs`]. [INFO] [stdout] ... [INFO] [stdout] 149 | /// ``` [INFO] [stdout] 150 ~ fn from(val: ListOf32BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 151 | let mut data: Vec = Vec::new(); [INFO] [stdout] 152 ~ data.push(val.length); [INFO] [stdout] 153 ~ data.push(ListOf32BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 154 | data.append( [INFO] [stdout] 155 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return data; [INFO] [stdout] 162 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:37:69 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn new(company_identifier: u16, manufacturer_specific_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 ~ pub fn new(company_identifier: u16, manufacturer_specific_data: &[u8]) -> Self { [INFO] [stdout] 38 | Self { [INFO] [stdout] 39 | length: 3 + manufacturer_specific_data.len() as u8, [INFO] [stdout] 40 | company_identifier, [INFO] [stdout] 41 ~ manufacturer_specific_data: manufacturer_specific_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | impl Into> for ManufacturerSpecificData { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 96 ~ impl From for Vec { [INFO] [stdout] 97 | /// Create [`Vec`] from [`ManufacturerSpecificData`]. [INFO] [stdout] ... [INFO] [stdout] 124 | /// ``` [INFO] [stdout] 125 ~ fn from(val: ManufacturerSpecificData) -> Self { [INFO] [stdout] 126 | let mut data: Vec = Vec::new(); [INFO] [stdout] 127 ~ data.push(val.length); [INFO] [stdout] 128 ~ data.push(ManufacturerSpecificData::data_type()); [INFO] [stdout] 129 ~ data.append(&mut val.company_identifier.to_le_bytes().to_vec()); [INFO] [stdout] 130 ~ data.append(&mut val.manufacturer_specific_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return data; [INFO] [stdout] 131 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | rsp_aa: rsp_aa.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*rsp_aa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:131:1 [INFO] [stdout] | [INFO] [stdout] 131 | impl Into> for PeriodicAdvertisingResponseTimingInformation { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 131 ~ impl From for Vec { [INFO] [stdout] 132 | /// Create [`Vec`] from [`PeriodicAdvertisingResponseTimingInformation`]. [INFO] [stdout] ... [INFO] [stdout] 169 | /// ``` [INFO] [stdout] 170 ~ fn from(val: PeriodicAdvertisingResponseTimingInformation) -> Self { [INFO] [stdout] 171 | let mut data: Vec = Vec::new(); [INFO] [stdout] 172 ~ data.push(val.length); [INFO] [stdout] 173 ~ data.push(PeriodicAdvertisingResponseTimingInformation::data_type()); [INFO] [stdout] 174 ~ data.append(&mut val.rsp_aa.clone().to_vec()); [INFO] [stdout] 175 ~ data.push(val.num_subevents); [INFO] [stdout] 176 ~ data.push(val.subevent_interval); [INFO] [stdout] 177 ~ data.push(val.response_slot_delay); [INFO] [stdout] 178 ~ data.push(val.response_slot_spacing); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 179 - return data; [INFO] [stdout] 179 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/peripheral_connection_interval_range.rs:190:1 [INFO] [stdout] | [INFO] [stdout] 190 | impl Into> for PeripheralConnectionIntervalRange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 190 ~ impl From for Vec { [INFO] [stdout] 191 | /// Create [`Vec`] from [`PeripheralConnectionIntervalRange`]. [INFO] [stdout] ... [INFO] [stdout] 216 | /// ``` [INFO] [stdout] 217 ~ fn from(val: PeripheralConnectionIntervalRange) -> Self { [INFO] [stdout] 218 | let mut data: Vec = Vec::new(); [INFO] [stdout] 219 ~ data.push(val.length); [INFO] [stdout] 220 ~ data.push(PeripheralConnectionIntervalRange::data_type()); [INFO] [stdout] 221 ~ data.append(&mut val.minimum_value.to_le_bytes().to_vec()); [INFO] [stdout] 222 ~ data.append(&mut val.maximum_value.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/peripheral_connection_interval_range.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 223 - return data; [INFO] [stdout] 223 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/public_target_address.rs:36:39 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(public_target_address: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(public_target_address: &[u64]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: public_target_address.len() as u8 * 6 + 1, [INFO] [stdout] 39 ~ public_target_address: public_target_address.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/public_target_address.rs:118:1 [INFO] [stdout] | [INFO] [stdout] 118 | impl Into> for PublicTargetAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 118 ~ impl From for Vec { [INFO] [stdout] 119 | /// Create [`Vec`] from [`PublicTargetAddress`]. [INFO] [stdout] ... [INFO] [stdout] 161 | /// ``` [INFO] [stdout] 162 ~ fn from(val: PublicTargetAddress) -> Self { [INFO] [stdout] 163 | let mut data: Vec = Vec::new(); [INFO] [stdout] 164 ~ data.push(val.length); [INFO] [stdout] 165 ~ data.push(PublicTargetAddress::data_type()); [INFO] [stdout] 166 | data.append( [INFO] [stdout] 167 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/public_target_address.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 - return data; [INFO] [stdout] 175 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/random_target_address.rs:35:39 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(random_target_address: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(random_target_address: &[u64]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: random_target_address.len() as u8 * 6 + 1, [INFO] [stdout] 38 ~ random_target_address: random_target_address.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/random_target_address.rs:117:1 [INFO] [stdout] | [INFO] [stdout] 117 | impl Into> for RandomTargetAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 117 ~ impl From for Vec { [INFO] [stdout] 118 | /// Create [`Vec`] from [`RandomTargetAddress`]. [INFO] [stdout] ... [INFO] [stdout] 160 | /// ``` [INFO] [stdout] 161 ~ fn from(val: RandomTargetAddress) -> Self { [INFO] [stdout] 162 | let mut data: Vec = Vec::new(); [INFO] [stdout] 163 ~ data.push(val.length); [INFO] [stdout] 164 ~ data.push(RandomTargetAddress::data_type()); [INFO] [stdout] 165 | data.append( [INFO] [stdout] 166 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/random_target_address.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 174 - return data; [INFO] [stdout] 174 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c192.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecureSimplePairingHashC192 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecureSimplePairingHashC192`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecureSimplePairingHashC192) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecureSimplePairingHashC192::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.secure_simple_pairing_hash_c192.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c192.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c256.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecureSimplePairingHashC256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecureSimplePairingHashC256`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecureSimplePairingHashC256) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecureSimplePairingHashC256::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.secure_simple_pairing_hash_c256.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c256.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r192.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | impl Into> for SecureSimplePairingRandomizerR192 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 84 ~ impl From for Vec { [INFO] [stdout] 85 | /// Create [`Vec`] from [SecureSimplePairingRandomizerR192]. [INFO] [stdout] ... [INFO] [stdout] 109 | /// ``` [INFO] [stdout] 110 ~ fn from(val: SecureSimplePairingRandomizerR192) -> Self { [INFO] [stdout] 111 | let mut data: Vec = Vec::new(); [INFO] [stdout] 112 ~ data.push(val.length); [INFO] [stdout] 113 ~ data.push(SecureSimplePairingRandomizerR192::data_type()); [INFO] [stdout] 114 | data.append( [INFO] [stdout] 115 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r192.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 120 - return data; [INFO] [stdout] 120 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r256.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | impl Into> for SecureSimplePairingRandomizerR256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 84 ~ impl From for Vec { [INFO] [stdout] 85 | /// Create [`Vec`] from [`SecureSimplePairingRandomizerR256`]. [INFO] [stdout] ... [INFO] [stdout] 109 | /// ``` [INFO] [stdout] 110 ~ fn from(val: SecureSimplePairingRandomizerR256) -> Self { [INFO] [stdout] 111 | let mut data: Vec = Vec::new(); [INFO] [stdout] 112 ~ data.push(val.length); [INFO] [stdout] 113 ~ data.push(SecureSimplePairingRandomizerR256::data_type()); [INFO] [stdout] 114 | data.append( [INFO] [stdout] 115 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r256.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 120 - return data; [INFO] [stdout] 120 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[bool; 8]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/security_manager_oob.rs:41:35 [INFO] [stdout] | [INFO] [stdout] 41 | security_manager_oob: security_manager_oob.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*security_manager_oob` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/security_manager_oob.rs:206:1 [INFO] [stdout] | [INFO] [stdout] 206 | impl Into> for SecurityManagerOutOfBand { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 206 ~ impl From for Vec { [INFO] [stdout] 207 | /// Create [`Vec`] from [`SecurityManagerOutOfBand`]. [INFO] [stdout] ... [INFO] [stdout] 297 | /// ``` [INFO] [stdout] 298 ~ fn from(val: SecurityManagerOutOfBand) -> Self { [INFO] [stdout] 299 | let mut data: Vec = Vec::new(); [INFO] [stdout] 300 ~ data.push(val.length); [INFO] [stdout] 301 ~ data.push(SecurityManagerOutOfBand::data_type()); [INFO] [stdout] 302 | [INFO] [stdout] 303 | let mut security_manager_oob = 0u8; [INFO] [stdout] 304 ~ if val.security_manager_oob[0] { [INFO] [stdout] 305 | security_manager_oob |= SECURITY_MANAGER_OUT_OF_BAND_FLAG_OOB_FLAGS; [INFO] [stdout] 306 | } [INFO] [stdout] 307 ~ if val.security_manager_oob[1] { [INFO] [stdout] 308 | security_manager_oob |= SECURITY_MANAGER_LE_SUPPORTED; [INFO] [stdout] 309 | } [INFO] [stdout] 310 ~ if val.security_manager_oob[3] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/security_manager_oob.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 314 - return data; [INFO] [stdout] 314 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/security_manager_tk_value.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecurityManagerTkValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecurityManagerTkValue`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecurityManagerTkValue) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecurityManagerTkValue::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.security_manager_tk_value.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/security_manager_tk_value.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 17 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:95:1 [INFO] [stdout] | [INFO] [stdout] 95 | impl Into> for ServiceData128BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 95 ~ impl From for Vec { [INFO] [stdout] 96 | /// Create [`Vec`] from [`ServiceData128BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 124 | /// ``` [INFO] [stdout] 125 ~ fn from(val: ServiceData128BitUUID) -> Self { [INFO] [stdout] 126 | let mut data: Vec = Vec::new(); [INFO] [stdout] 127 ~ data.push(val.length); [INFO] [stdout] 128 ~ data.push(ServiceData128BitUUID::data_type()); [INFO] [stdout] 129 ~ data.append(&mut val.uuid.as_u128().to_le_bytes().to_vec()); [INFO] [stdout] 130 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return data; [INFO] [stdout] 131 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 3 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | impl Into> for ServiceData16BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 103 ~ impl From for Vec { [INFO] [stdout] 104 | /// Create [`Vec`] from [`ServiceData16BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: ServiceData16BitUUID) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(ServiceData16BitUUID::data_type()); [INFO] [stdout] 143 ~ data.append(&mut val.uuid.to_bytes_le()[..2].to_vec()); [INFO] [stdout] 144 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return data; [INFO] [stdout] 145 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 5 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:101:1 [INFO] [stdout] | [INFO] [stdout] 101 | impl Into> for ServiceData32BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 101 ~ impl From for Vec { [INFO] [stdout] 102 | /// Create [`Vec`] from [`ServiceData32BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 132 | /// ``` [INFO] [stdout] 133 ~ fn from(val: ServiceData32BitUUID) -> Self { [INFO] [stdout] 134 | let mut data: Vec = Vec::new(); [INFO] [stdout] 135 ~ data.push(val.length); [INFO] [stdout] 136 ~ data.push(ServiceData32BitUUID::data_type()); [INFO] [stdout] 137 ~ data.append(&mut val.uuid.to_bytes_le()[..4].to_vec()); [INFO] [stdout] 138 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return data; [INFO] [stdout] 139 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/shortened_local_name.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | length: shortened_local_name.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `shortened_local_name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/shortened_local_name.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | impl Into> for ShortenedLocalName { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 81 ~ impl From for Vec { [INFO] [stdout] 82 | /// Create [`Vec`] from [`ShortenedLocalName`]. [INFO] [stdout] ... [INFO] [stdout] 105 | /// ``` [INFO] [stdout] 106 ~ fn from(val: ShortenedLocalName) -> Self { [INFO] [stdout] 107 | let mut data: Vec = Vec::new(); [INFO] [stdout] 108 ~ data.push(val.length); [INFO] [stdout] 109 ~ data.push(ShortenedLocalName::data_type()); [INFO] [stdout] 110 ~ data.append(&mut val.shortened_local_name.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/shortened_local_name.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return data; [INFO] [stdout] 111 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/tx_power_level.rs:97:1 [INFO] [stdout] | [INFO] [stdout] 97 | impl Into> for TxPowerLevel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 97 ~ impl From for Vec { [INFO] [stdout] 98 | /// Create [`Vec`] from [`TxPowerLevel`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: TxPowerLevel) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(TxPowerLevel::data_type()); [INFO] [stdout] 143 ~ data.push(val.tx_power_level as u8); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/tx_power_level.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 144 - return data; [INFO] [stdout] 144 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 141 | | data.push(self.length); [INFO] [stdout] 142 | | data.push(Self::data_type()); [INFO] [stdout] 143 | | data.push(self.tx_power_level as u8); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | length: uniform_resource_identifier.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uniform_resource_identifier.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | impl Into> for UniformResourceIdentifier { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 116 ~ impl From for Vec { [INFO] [stdout] 117 | /// Create [`Vec`] from [`UniformResourceIdentifier`]. [INFO] [stdout] ... [INFO] [stdout] 163 | /// ``` [INFO] [stdout] 164 ~ fn from(val: UniformResourceIdentifier) -> Self { [INFO] [stdout] 165 | let mut data: Vec = Vec::new(); [INFO] [stdout] 166 ~ data.push(val.length); [INFO] [stdout] 167 ~ data.push(UniformResourceIdentifier::data_type()); [INFO] [stdout] 168 ~ data.append(&mut String::from(val.scheme).into_bytes()); [INFO] [stdout] 169 ~ data.append(&mut val.uniform_resource_identifier.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 170 - return data; [INFO] [stdout] 170 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_extended_properties.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for CharacteristicExtendedProperties { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`CharacteristicExtendedProperties`]. [INFO] [stdout] ... [INFO] [stdout] 125 | /// ``` [INFO] [stdout] 126 ~ fn from(val: CharacteristicExtendedProperties) -> Self { [INFO] [stdout] 127 ~ u16::to_le_bytes(val.properties).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_user_description.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | impl Into> for CharacteristicUserDescription { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 54 ~ impl From for Vec { [INFO] [stdout] 55 | /// Create [`Vec`] from [`CharacteristicUserDescription`]. [INFO] [stdout] ... [INFO] [stdout] 68 | /// ``` [INFO] [stdout] 69 ~ fn from(val: CharacteristicUserDescription) -> Self { [INFO] [stdout] 70 ~ val.description.clone().into_bytes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/client_characteristic_configuration.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for ClientCharacteristicConfiguration { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`ClientCharacteristicConfiguration`]. [INFO] [stdout] ... [INFO] [stdout] 125 | /// ``` [INFO] [stdout] 126 ~ fn from(val: ClientCharacteristicConfiguration) -> Self { [INFO] [stdout] 127 ~ u16::to_le_bytes(val.configuration).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/server_characteristic_configuration.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | impl Into> for ServerCharacteristicConfiguration { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 80 ~ impl From for Vec { [INFO] [stdout] 81 | /// Create [`Vec`] from [`ServerCharacteristicConfiguration`]. [INFO] [stdout] ... [INFO] [stdout] 94 | /// ``` [INFO] [stdout] 95 ~ fn from(val: ServerCharacteristicConfiguration) -> Self { [INFO] [stdout] 96 ~ u16::to_le_bytes(val.configuration).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_presentation_format.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for CharacteristicPresentationFormat { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`CharacteristicPresentationFormat`]. [INFO] [stdout] ... [INFO] [stdout] 132 | /// ``` [INFO] [stdout] 133 ~ fn from(val: CharacteristicPresentationFormat) -> Self { [INFO] [stdout] 134 | let mut data: Vec = Vec::new(); [INFO] [stdout] 135 ~ data.push(val.format); [INFO] [stdout] 136 ~ data.push(val.exponent as u8); [INFO] [stdout] 137 ~ data.append(&mut val.unit.to_le_bytes().to_vec()); [INFO] [stdout] 138 ~ data.push(val.name_space); [INFO] [stdout] 139 ~ data.append(&mut val.description.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/descriptors/characteristic_presentation_format.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 140 - return data; [INFO] [stdout] 140 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:26:43 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(list_of_attribute_handles: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ pub fn new(list_of_attribute_handles: &[u16]) -> Self { [INFO] [stdout] 27 | Self { [INFO] [stdout] 28 ~ list_of_attribute_handles: list_of_attribute_handles.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:83:1 [INFO] [stdout] | [INFO] [stdout] 83 | impl Into> for CharacteristicAggregateFormat { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 83 ~ impl From for Vec { [INFO] [stdout] 84 | /// Create [`Vec`] from [`CharacteristicAggregateFormat`]. [INFO] [stdout] ... [INFO] [stdout] 103 | /// ``` [INFO] [stdout] 104 ~ fn from(val: CharacteristicAggregateFormat) -> Self { [INFO] [stdout] 105 ~ return val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / return self [INFO] [stdout] 106 | | .list_of_attribute_handles [INFO] [stdout] 107 | | .clone() [INFO] [stdout] 108 | | .iter() [INFO] [stdout] 109 | | .flat_map(|f| f.to_le_bytes()) [INFO] [stdout] 110 | | .collect(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 105 ~ self [INFO] [stdout] 106 + .list_of_attribute_handles [INFO] [stdout] 107 + .clone() [INFO] [stdout] 108 + .iter() [INFO] [stdout] 109 + .flat_map(|f| f.to_le_bytes()) [INFO] [stdout] 110 ~ .collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/advertising_interval.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for AdvertisingInterval { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [`AdvertisingInterval`]. [INFO] [stdout] ... [INFO] [stdout] 128 | /// ``` [INFO] [stdout] 129 ~ fn from(val: AdvertisingInterval) -> Self { [INFO] [stdout] 130 | let mut data: Vec = Vec::new(); [INFO] [stdout] 131 ~ data.push(val.length); [INFO] [stdout] 132 ~ data.push(AdvertisingInterval::data_type()); [INFO] [stdout] 133 ~ data.append(&mut val.advertising_interval.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/advertising_interval.rs:134:9 [INFO] [stdout] | [INFO] [stdout] 134 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 134 - return data; [INFO] [stdout] 134 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/advertising_interval_long.rs:149:1 [INFO] [stdout] | [INFO] [stdout] 149 | impl Into> for AdvertisingIntervalLong { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 149 ~ impl From for Vec { [INFO] [stdout] 150 | /// Create [`Vec`] from [`AdvertisingIntervalLong`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: AdvertisingIntervalLong) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(AdvertisingIntervalLong::data_type()); [INFO] [stdout] 193 ~ if val.is_u32 { [INFO] [stdout] 194 ~ data.append(&mut val.advertising_interval_long.to_le_bytes().to_vec()); [INFO] [stdout] 195 | } else { [INFO] [stdout] 196 ~ data.append(&mut val.advertising_interval_long.to_le_bytes()[..3].to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/advertising_interval_long.rs:198:9 [INFO] [stdout] | [INFO] [stdout] 198 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 198 - return data; [INFO] [stdout] 198 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/appearance.rs:120:1 [INFO] [stdout] | [INFO] [stdout] 120 | impl Into> for Appearance { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 120 ~ impl From for Vec { [INFO] [stdout] 121 | /// Create [`Vec`] from [`Appearance`]. [INFO] [stdout] ... [INFO] [stdout] 144 | /// ``` [INFO] [stdout] 145 ~ fn from(val: Appearance) -> Self { [INFO] [stdout] 146 | let mut data: Vec = Vec::new(); [INFO] [stdout] 147 ~ data.push(val.length); [INFO] [stdout] 148 ~ data.push(Appearance::data_type()); [INFO] [stdout] 149 ~ data.append(&mut val.appearance.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/appearance.rs:150:9 [INFO] [stdout] | [INFO] [stdout] 150 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 150 - return data; [INFO] [stdout] 150 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (22/7) [INFO] [stdout] --> src/data_types/big_info.rs:206:5 [INFO] [stdout] | [INFO] [stdout] 206 | / pub fn new( [INFO] [stdout] 207 | | big_offset: u16, [INFO] [stdout] 208 | | big_offset_units: bool, [INFO] [stdout] 209 | | iso_interval: u16, [INFO] [stdout] ... | [INFO] [stdout] 228 | | gskd: Option<[u8; 16]>, [INFO] [stdout] 229 | | ) -> Self { [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/data_types/big_info.rs:231:28 [INFO] [stdout] | [INFO] [stdout] 231 | length: if let None = giv { 34 } else { 58 }, [INFO] [stdout] | -------^^^^------ help: try: `if giv.is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/big_info.rs:550:1 [INFO] [stdout] | [INFO] [stdout] 550 | impl Into> for BigInfo { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 550 ~ impl From for Vec { [INFO] [stdout] 551 | /// Create [`Vec`] from [`BigInfo`]. [INFO] [stdout] ... [INFO] [stdout] 680 | /// ``` [INFO] [stdout] 681 ~ fn from(val: BigInfo) -> Self { [INFO] [stdout] 682 | let mut data: Vec = Vec::new(); [INFO] [stdout] 683 ~ data.push(val.length); [INFO] [stdout] 684 ~ data.push(BigInfo::data_type()); [INFO] [stdout] 685 ~ data.push(val.big_offset as u8); [INFO] [stdout] 686 ~ let mut value: u8 = (val.big_offset >> 8) as u8; [INFO] [stdout] 687 ~ if val.big_offset_units { [INFO] [stdout] 688 | value |= 0b01000000; [INFO] [stdout] 689 | } [INFO] [stdout] 690 ~ value |= (val.iso_interval << 7) as u8; [INFO] [stdout] 691 | data.push(value); [INFO] [stdout] 692 | [INFO] [stdout] 693 ~ data.push((val.iso_interval >> 1) as u8); [INFO] [stdout] 694 | [INFO] [stdout] 695 ~ value = (val.iso_interval >> 9) as u8; [INFO] [stdout] 696 ~ value |= val.num_bis << 3; [INFO] [stdout] 697 | data.push(value); [INFO] [stdout] 698 | [INFO] [stdout] 699 ~ value = val.nse; [INFO] [stdout] 700 ~ value |= val.bn << 5; [INFO] [stdout] 701 | data.push(value); [INFO] [stdout] 702 | [INFO] [stdout] 703 ~ data.push(val.sub_interval as u8); [INFO] [stdout] 704 ~ data.push((val.sub_interval >> 8) as u8); [INFO] [stdout] 705 ~ value = (val.sub_interval >> 16) as u8; [INFO] [stdout] 706 ~ value |= val.pto << 4; [INFO] [stdout] 707 | data.push(value); [INFO] [stdout] 708 | [INFO] [stdout] 709 ~ data.push(val.bis_spacing as u8); [INFO] [stdout] 710 ~ data.push((val.bis_spacing >> 8) as u8); [INFO] [stdout] 711 ~ value = (val.bis_spacing >> 16) as u8; [INFO] [stdout] 712 ~ value |= val.irc << 4; [INFO] [stdout] 713 | data.push(value); [INFO] [stdout] 714 | [INFO] [stdout] 715 ~ data.push(val.max_pdu); [INFO] [stdout] 716 ~ data.push(val.rfu); [INFO] [stdout] 717 | [INFO] [stdout] 718 ~ data.append(&mut val.seed_access_address.to_le_bytes().to_vec()); [INFO] [stdout] 719 | [INFO] [stdout] 720 ~ data.push(val.sdu_interval as u8); [INFO] [stdout] 721 ~ data.push((val.sdu_interval >> 8) as u8); [INFO] [stdout] 722 ~ value = (val.sdu_interval >> 16) as u8; [INFO] [stdout] 723 ~ value |= (val.max_sdu << 4) as u8; [INFO] [stdout] 724 | data.push(value); [INFO] [stdout] 725 ~ data.push((val.max_sdu >> 4) as u8); [INFO] [stdout] 726 | [INFO] [stdout] 727 ~ data.append(&mut val.base_crc_init.to_le_bytes().to_vec()); [INFO] [stdout] 728 | [INFO] [stdout] 729 ~ data.push(val.ch_m as u8); [INFO] [stdout] 730 ~ data.push((val.ch_m >> 8) as u8); [INFO] [stdout] 731 ~ data.push((val.ch_m >> 16) as u8); [INFO] [stdout] 732 ~ data.push((val.ch_m >> 24) as u8); [INFO] [stdout] 733 ~ value = (val.ch_m >> 32) as u8; [INFO] [stdout] 734 ~ value |= val.phy << 5; [INFO] [stdout] 735 | data.push(value); [INFO] [stdout] 736 | [INFO] [stdout] 737 ~ data.push(val.bis_payload_count as u8); [INFO] [stdout] 738 ~ data.push((val.bis_payload_count >> 8) as u8); [INFO] [stdout] 739 ~ data.push((val.bis_payload_count >> 16) as u8); [INFO] [stdout] 740 ~ data.push((val.bis_payload_count >> 24) as u8); [INFO] [stdout] 741 ~ value = (val.bis_payload_count >> 32) as u8; [INFO] [stdout] 742 ~ if val.framing { [INFO] [stdout] 743 | value |= 0b10000000; [INFO] [stdout] 744 | } [INFO] [stdout] 745 | data.push(value); [INFO] [stdout] 746 ~ match val.giv { [INFO] [stdout] 747 | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 748 | None => (), [INFO] [stdout] 749 | } [INFO] [stdout] 750 ~ match val.gskd { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/big_info.rs:754:9 [INFO] [stdout] | [INFO] [stdout] 754 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 754 - return data; [INFO] [stdout] 754 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/data_types/big_info.rs:746:9 [INFO] [stdout] | [INFO] [stdout] 746 | / match self.giv { [INFO] [stdout] 747 | | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 748 | | None => (), [INFO] [stdout] 749 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(x) = self.giv { data.append(&mut x.clone().to_vec()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/data_types/big_info.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | / match self.gskd { [INFO] [stdout] 751 | | Some(x) => data.append(&mut x.clone().to_vec()), [INFO] [stdout] 752 | | None => (), [INFO] [stdout] 753 | | } [INFO] [stdout] | |_________^ help: try: `if let Some(x) = self.gskd { data.append(&mut x.clone().to_vec()) }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/broadcast_code.rs:42:32 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn new(broadcast_code: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 42 ~ pub fn new(broadcast_code: &[u8]) -> Self { [INFO] [stdout] 43 | Self { [INFO] [stdout] 44 | length: 1 + broadcast_code.len() as u8, [INFO] [stdout] 45 ~ broadcast_code: broadcast_code.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/broadcast_code.rs:123:1 [INFO] [stdout] | [INFO] [stdout] 123 | impl Into> for BroadcastCode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 123 ~ impl From for Vec { [INFO] [stdout] 124 | /// Create [`Vec`] from [`BroadcastCode`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: BroadcastCode) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(BroadcastCode::data_type()); [INFO] [stdout] 193 ~ data.append(&mut val.broadcast_code.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/broadcast_code.rs:194:9 [INFO] [stdout] | [INFO] [stdout] 194 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 194 - return data; [INFO] [stdout] 194 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:36:22 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(ch_m: &Vec, instant: u16) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 - pub fn new(ch_m: &Vec, instant: u16) -> Self { [INFO] [stdout] 36 + pub fn new(ch_m: &[bool], instant: u16) -> Self { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:111:17 [INFO] [stdout] | [INFO] [stdout] 111 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 112 | | data.push(x & 0b0000_0001 != 0); [INFO] [stdout] 113 | | data.push(x & 0b0000_0010 != 0); [INFO] [stdout] 114 | | data.push(x & 0b0000_0100 != 0); [INFO] [stdout] ... | [INFO] [stdout] 118 | | data.push(x & 0b0100_0000 != 0); [INFO] [stdout] 119 | | data.push(x & 0b1000_0000 != 0); [INFO] [stdout] | |________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:131:1 [INFO] [stdout] | [INFO] [stdout] 131 | impl Into> for ChannelMapUpdateIndication { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 131 ~ impl From for Vec { [INFO] [stdout] 132 | /// Create [`Vec`] from [`ChannelMapUpdateIndication`]. [INFO] [stdout] ... [INFO] [stdout] 167 | /// ``` [INFO] [stdout] 168 ~ fn from(val: ChannelMapUpdateIndication) -> Self { [INFO] [stdout] 169 | let mut data: Vec = Vec::new(); [INFO] [stdout] 170 ~ data.push(val.length); [INFO] [stdout] 171 ~ data.push(ChannelMapUpdateIndication::data_type()); [INFO] [stdout] 172 | let mut ch_m = [0u8; 5]; [INFO] [stdout] 173 ~ for (i, element) in val.ch_m.iter().enumerate() { [INFO] [stdout] 174 | if *element { [INFO] [stdout] ... [INFO] [stdout] 178 | data.append(&mut ch_m.to_vec()); [INFO] [stdout] 179 ~ data.append(&mut val.instant.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 180 - return data; [INFO] [stdout] 180 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:175:17 [INFO] [stdout] | [INFO] [stdout] 175 | ch_m[i / 8] = ch_m[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `ch_m[i / 8] |= 1 << i % 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:253:21 [INFO] [stdout] | [INFO] [stdout] 253 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 254 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 255 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 256 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 260 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 261 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/data_types/channel_map_update_indication.rs:294:21 [INFO] [stdout] | [INFO] [stdout] 294 | u8_vec[i / 8] = u8_vec[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u8_vec[i / 8] |= 1 << i % 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/class_of_device.rs:159:1 [INFO] [stdout] | [INFO] [stdout] 159 | impl Into> for ClassOfDevice { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 159 ~ impl From for Vec { [INFO] [stdout] 160 | /// Create [`Vec`] from [`ClassOfDevice`]. [INFO] [stdout] ... [INFO] [stdout] 188 | /// ``` [INFO] [stdout] 189 ~ fn from(val: ClassOfDevice) -> Self { [INFO] [stdout] 190 | let mut data: Vec = Vec::new(); [INFO] [stdout] 191 ~ data.push(val.length); [INFO] [stdout] 192 ~ data.push(ClassOfDevice::data_type()); [INFO] [stdout] 193 ~ data.push(val.class_of_device as u8); [INFO] [stdout] 194 ~ data.push((val.class_of_device >> 8) as u8); [INFO] [stdout] 195 ~ data.push((val.class_of_device >> 16) as u8); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/class_of_device.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 196 - return data; [INFO] [stdout] 196 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/class_of_device.rs:190:9 [INFO] [stdout] | [INFO] [stdout] 190 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 191 | | data.push(self.length); [INFO] [stdout] 192 | | data.push(Self::data_type()); [INFO] [stdout] 193 | | data.push(self.class_of_device as u8); [INFO] [stdout] 194 | | data.push((self.class_of_device >> 8) as u8); [INFO] [stdout] 195 | | data.push((self.class_of_device >> 16) as u8); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/class_of_device.rs:288:9 [INFO] [stdout] | [INFO] [stdout] 288 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 289 | | data.push(length); [INFO] [stdout] 290 | | data.push(ClassOfDevice::data_type()); [INFO] [stdout] 291 | | data.push(class_of_device as u8); [INFO] [stdout] 292 | | data.push((class_of_device >> 8) as u8); [INFO] [stdout] 293 | | data.push((class_of_device >> 16) as u8); [INFO] [stdout] | |_________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/class_of_device.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 320 | | data.push(4); [INFO] [stdout] 321 | | data.push(ClassOfDevice::data_type()); [INFO] [stdout] 322 | | data.push(class_of_device as u8); [INFO] [stdout] 323 | | data.push((class_of_device >> 8) as u8); [INFO] [stdout] 324 | | data.push((class_of_device >> 16) as u8); [INFO] [stdout] | |_________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for CompleteListOf128BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`CompleteListOf128BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 133 | /// ``` [INFO] [stdout] 134 ~ fn from(val: CompleteListOf128BitServiceUuids) -> Self { [INFO] [stdout] 135 | let mut data: Vec = Vec::new(); [INFO] [stdout] 136 ~ data.push(val.length); [INFO] [stdout] 137 ~ data.push(CompleteListOf128BitServiceUuids::data_type()); [INFO] [stdout] 138 | data.append( [INFO] [stdout] 139 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_128bit_service_uuids.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | impl Into> for CompleteListOf16BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 96 ~ impl From for Vec { [INFO] [stdout] 97 | /// Create [`Vec`] from [`CompleteListOf16BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 141 | /// ``` [INFO] [stdout] 142 ~ fn from(val: CompleteListOf16BitServiceUuids) -> Self { [INFO] [stdout] 143 | let mut data: Vec = Vec::new(); [INFO] [stdout] 144 ~ data.push(val.length); [INFO] [stdout] 145 ~ data.push(CompleteListOf16BitServiceUuids::data_type()); [INFO] [stdout] 146 | data.append( [INFO] [stdout] 147 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 154 - return data; [INFO] [stdout] 154 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:217:40 [INFO] [stdout] | [INFO] [stdout] 217 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/complete_list_of_16bit_service_uuids.rs:250:40 [INFO] [stdout] | [INFO] [stdout] 250 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:110:1 [INFO] [stdout] | [INFO] [stdout] 110 | impl Into> for CompleteListOf32BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 110 ~ impl From for Vec { [INFO] [stdout] 111 | /// Create [`Vec`] from [`CompleteListOf32BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 148 | /// ``` [INFO] [stdout] 149 ~ fn from(val: CompleteListOf32BitServiceUuids) -> Self { [INFO] [stdout] 150 | let mut data: Vec = Vec::new(); [INFO] [stdout] 151 ~ data.push(val.length); [INFO] [stdout] 152 ~ data.push(CompleteListOf32BitServiceUuids::data_type()); [INFO] [stdout] 153 | data.append( [INFO] [stdout] 154 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_list_of_32bit_service_uuids.rs:161:9 [INFO] [stdout] | [INFO] [stdout] 161 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 161 - return data; [INFO] [stdout] 161 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/complete_local_name.rs:30:21 [INFO] [stdout] | [INFO] [stdout] 30 | length: complete_local_name.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `complete_local_name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/complete_local_name.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | impl Into> for CompleteLocalName { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 80 ~ impl From for Vec { [INFO] [stdout] 81 | /// Create[`Vec`] from [`CompleteLocalName`]. [INFO] [stdout] ... [INFO] [stdout] 104 | /// ``` [INFO] [stdout] 105 ~ fn from(val: CompleteLocalName) -> Self { [INFO] [stdout] 106 | let mut data: Vec = Vec::new(); [INFO] [stdout] 107 ~ data.push(val.length); [INFO] [stdout] 108 ~ data.push(CompleteLocalName::data_type()); [INFO] [stdout] 109 ~ data.append(&mut val.complete_local_name.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/complete_local_name.rs:110:9 [INFO] [stdout] | [INFO] [stdout] 110 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 110 - return data; [INFO] [stdout] 110 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/complete_local_name.rs:152:20 [INFO] [stdout] | [INFO] [stdout] 152 | assert_eq!(name.as_bytes().len() as u8 + 1, result.length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/complete_local_name.rs:159:22 [INFO] [stdout] | [INFO] [stdout] 159 | let length = name.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/complete_local_name.rs:187:19 [INFO] [stdout] | [INFO] [stdout] 187 | data.push(name.as_bytes().len() as u8 + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/data_types/data_type_parser.rs:1441:22 [INFO] [stdout] | [INFO] [stdout] 1441 | .map(|f| DataTypeParseResult::from(f)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `DataTypeParseResult::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `results.results.get(0)` [INFO] [stdout] --> src/data_types/data_type_parser.rs:2121:13 [INFO] [stdout] | [INFO] [stdout] 2121 | results.results.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `results.results.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/data_types/data_type_parser.rs:2128:17 [INFO] [stdout] | [INFO] [stdout] 2128 | assert!(matches!(results.results.get(2), None)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `results.results.get(2).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `results.results.get(0)` [INFO] [stdout] --> src/data_types/data_type_parser.rs:2140:13 [INFO] [stdout] | [INFO] [stdout] 2140 | results.results.get(0), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `results.results.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_none()` [INFO] [stdout] --> src/data_types/data_type_parser.rs:2147:17 [INFO] [stdout] | [INFO] [stdout] 2147 | assert!(matches!(results.results.get(2), None)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `results.results.get(2).is_none()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/encrypted_data.rs:38:47 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn new(randomizer: &[u8; 5], payload: &Vec, mic: [u8; 4]) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 38 ~ pub fn new(randomizer: &[u8; 5], payload: &[u8], mic: [u8; 4]) -> Self { [INFO] [stdout] 39 | Self { [INFO] [stdout] 40 | length: 10 + payload.len() as u8, [INFO] [stdout] 41 | randomizer: randomizer.clone(), [INFO] [stdout] 42 ~ payload: payload.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 5]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/encrypted_data.rs:41:25 [INFO] [stdout] | [INFO] [stdout] 41 | randomizer: randomizer.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*randomizer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/encrypted_data.rs:43:18 [INFO] [stdout] | [INFO] [stdout] 43 | mic: mic.clone(), [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `mic` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/data_types/encrypted_data.rs:90:9 [INFO] [stdout] | [INFO] [stdout] 90 | let randomizer: [u8; 5]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `randomizer` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 90 ~ [INFO] [stdout] 91 ~ let randomizer: [u8; 5] = match value[2..7].try_into() { [INFO] [stdout] 92 ~ Ok(x) => x, [INFO] [stdout] 93 | Err(x) => return Err(x.to_string()), [INFO] [stdout] 94 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/data_types/encrypted_data.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | let mic: [u8; 4]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] help: move the declaration `mic` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 95 ~ [INFO] [stdout] 96 ~ let mic: [u8; 4] = match value[value.len() - 4..].try_into() { [INFO] [stdout] 97 ~ Ok(x) => x, [INFO] [stdout] 98 | Err(x) => return Err(x.to_string()), [INFO] [stdout] 99 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/encrypted_data.rs:109:1 [INFO] [stdout] | [INFO] [stdout] 109 | impl Into> for EncryptedData { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 109 ~ impl From for Vec { [INFO] [stdout] 110 | /// Create [`Vec`] from [`EncryptedData`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: EncryptedData) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(EncryptedData::data_type()); [INFO] [stdout] 143 ~ data.append(&mut val.randomizer.clone().to_vec()); [INFO] [stdout] 144 ~ data.append(&mut val.payload.clone()); [INFO] [stdout] 145 ~ data.append(&mut val.mic.clone().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/encrypted_data.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/flags.rs:47:23 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn new(flags: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 ~ pub fn new(flags: &[bool]) -> Self { [INFO] [stdout] 48 | Self { [INFO] [stdout] 49 | length: (flags.len() / 8 + 1) as u8, [INFO] [stdout] 50 ~ flags: flags.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.flags.get(0)` [INFO] [stdout] --> src/data_types/flags.rs:74:10 [INFO] [stdout] | [INFO] [stdout] 74 | *self.flags.get(0).unwrap_or(&false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: try: `self.flags.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:270:21 [INFO] [stdout] | [INFO] [stdout] 270 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 271 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 272 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 273 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 277 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 278 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/flags.rs:286:1 [INFO] [stdout] | [INFO] [stdout] 286 | impl Into> for Flags { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 286 ~ impl From for Vec { [INFO] [stdout] 287 | /// Create [`Vec`] from [`Flags`]. [INFO] [stdout] ... [INFO] [stdout] 434 | /// ``` [INFO] [stdout] 435 ~ fn from(val: Flags) -> Self { [INFO] [stdout] 436 | let mut data: Vec = Vec::new(); [INFO] [stdout] 437 ~ data.push(val.length); [INFO] [stdout] 438 ~ data.push(Flags::data_type()); [INFO] [stdout] 439 | [INFO] [stdout] 440 ~ let mut flags: Vec = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/flags.rs:455:9 [INFO] [stdout] | [INFO] [stdout] 455 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 455 - return data; [INFO] [stdout] 455 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:586:17 [INFO] [stdout] | [INFO] [stdout] 586 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 587 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 588 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 589 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 593 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 594 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |__________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:614:17 [INFO] [stdout] | [INFO] [stdout] 614 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 615 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 616 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 617 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 621 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 622 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |__________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:642:17 [INFO] [stdout] | [INFO] [stdout] 642 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 643 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 644 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 645 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 649 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 650 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |__________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:667:9 [INFO] [stdout] | [INFO] [stdout] 667 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 668 | | data.push(length); [INFO] [stdout] 669 | | data.push(Flags::data_type()); [INFO] [stdout] | |______________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/flags.rs:817:9 [INFO] [stdout] | [INFO] [stdout] 817 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 818 | | data.push(1); [INFO] [stdout] 819 | | data.push(Flags::data_type()); [INFO] [stdout] | |______________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for IncompleteListOf128BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`IncompleteListOf128BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 134 | /// ``` [INFO] [stdout] 135 ~ fn from(val: IncompleteListOf128BitServiceUuids) -> Self { [INFO] [stdout] 136 | let mut data: Vec = Vec::new(); [INFO] [stdout] 137 ~ data.push(val.length); [INFO] [stdout] 138 ~ data.push(IncompleteListOf128BitServiceUuids::data_type()); [INFO] [stdout] 139 | data.append( [INFO] [stdout] 140 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_128bit_service_uuids.rs:147:9 [INFO] [stdout] | [INFO] [stdout] 147 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 147 - return data; [INFO] [stdout] 147 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for IncompleteListOf16BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [`IncompleteListOf16BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: IncompleteListOf16BitServiceUuids) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(IncompleteListOf16BitServiceUuids::data_type()); [INFO] [stdout] 143 | data.append( [INFO] [stdout] 144 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 151 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return data; [INFO] [stdout] 151 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:214:40 [INFO] [stdout] | [INFO] [stdout] 214 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/incomplete_list_of_16bit_service_uuids.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:36:23 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 39 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:111:1 [INFO] [stdout] | [INFO] [stdout] 111 | impl Into> for IncompleteListOf32BitServiceUuids { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 111 ~ impl From for Vec { [INFO] [stdout] 112 | /// Create [`Vec`] from [`IncompleteListOf32BitServiceUuids`]. [INFO] [stdout] ... [INFO] [stdout] 149 | /// ``` [INFO] [stdout] 150 ~ fn from(val: IncompleteListOf32BitServiceUuids) -> Self { [INFO] [stdout] 151 | let mut data: Vec = Vec::new(); [INFO] [stdout] 152 ~ data.push(val.length); [INFO] [stdout] 153 ~ data.push(IncompleteListOf32BitServiceUuids::data_type()); [INFO] [stdout] 154 | data.append( [INFO] [stdout] 155 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/incomplete_list_of_32bit_service_uuids.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return data; [INFO] [stdout] 162 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:158:1 [INFO] [stdout] | [INFO] [stdout] 158 | impl Into> for LeBluetoothDeviceAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 158 ~ impl From for Vec { [INFO] [stdout] 159 | /// Create [`Vec`] from [`LeBluetoothDeviceAddress`]. [INFO] [stdout] ... [INFO] [stdout] 185 | /// ``` [INFO] [stdout] 186 ~ fn from(val: LeBluetoothDeviceAddress) -> Self { [INFO] [stdout] 187 | let mut data: Vec = Vec::new(); [INFO] [stdout] 188 ~ data.push(val.length); [INFO] [stdout] 189 ~ data.push(LeBluetoothDeviceAddress::data_type()); [INFO] [stdout] 190 ~ data.append(&mut val.le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] 191 ~ data.push(u8::from(val.address_type)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:192:9 [INFO] [stdout] | [INFO] [stdout] 192 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 192 - return data; [INFO] [stdout] 192 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:190:26 [INFO] [stdout] | [INFO] [stdout] 190 | data.append(&mut self.le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.le_bluetooth_device_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:274:26 [INFO] [stdout] | [INFO] [stdout] 274 | data.append(&mut le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `le_bluetooth_device_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:293:26 [INFO] [stdout] | [INFO] [stdout] 293 | data.append(&mut le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `le_bluetooth_device_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `u64` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/le_bluetooth_device_address.rs:326:26 [INFO] [stdout] | [INFO] [stdout] 326 | data.append(&mut le_bluetooth_device_address.clone().to_le_bytes()[..6].to_vec()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `le_bluetooth_device_address` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_role.rs:250:1 [INFO] [stdout] | [INFO] [stdout] 250 | impl Into> for LeRole { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 250 ~ impl From for Vec { [INFO] [stdout] 251 | /// Create [`Vec`] from [LeRole]. [INFO] [stdout] ... [INFO] [stdout] 329 | /// ``` [INFO] [stdout] 330 ~ fn from(val: LeRole) -> Self { [INFO] [stdout] 331 | let mut data: Vec = Vec::new(); [INFO] [stdout] 332 ~ data.push(val.length); [INFO] [stdout] 333 ~ data.push(LeRole::data_type()); [INFO] [stdout] 334 ~ data.push(val.le_role); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_role.rs:335:9 [INFO] [stdout] | [INFO] [stdout] 335 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 335 - return data; [INFO] [stdout] 335 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:331:9 [INFO] [stdout] | [INFO] [stdout] 331 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 332 | | data.push(self.length); [INFO] [stdout] 333 | | data.push(Self::data_type()); [INFO] [stdout] 334 | | data.push(self.le_role); [INFO] [stdout] | |________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:476:9 [INFO] [stdout] | [INFO] [stdout] 476 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 477 | | data.push(length); [INFO] [stdout] 478 | | data.push(LeRole::data_type()); [INFO] [stdout] 479 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:489:9 [INFO] [stdout] | [INFO] [stdout] 489 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 490 | | data.push(length); [INFO] [stdout] 491 | | data.push(LeRole::data_type()); [INFO] [stdout] 492 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:502:9 [INFO] [stdout] | [INFO] [stdout] 502 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 503 | | data.push(length); [INFO] [stdout] 504 | | data.push(LeRole::data_type()); [INFO] [stdout] 505 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:515:9 [INFO] [stdout] | [INFO] [stdout] 515 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 516 | | data.push(length); [INFO] [stdout] 517 | | data.push(LeRole::data_type()); [INFO] [stdout] 518 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:542:9 [INFO] [stdout] | [INFO] [stdout] 542 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 543 | | data.push(length); [INFO] [stdout] 544 | | data.push(LeRole::data_type()); [INFO] [stdout] 545 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:560:9 [INFO] [stdout] | [INFO] [stdout] 560 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 561 | | data.push(length); [INFO] [stdout] 562 | | data.push(LeRole::data_type()); [INFO] [stdout] 563 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:578:9 [INFO] [stdout] | [INFO] [stdout] 578 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 579 | | data.push(length); [INFO] [stdout] 580 | | data.push(LeRole::data_type()); [INFO] [stdout] 581 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_role.rs:596:9 [INFO] [stdout] | [INFO] [stdout] 596 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 597 | | data.push(length); [INFO] [stdout] 598 | | data.push(LeRole::data_type()); [INFO] [stdout] 599 | | data.push(le_role); [INFO] [stdout] | |___________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_secure_connections_confirmation_value.rs:89:1 [INFO] [stdout] | [INFO] [stdout] 89 | impl Into> for LeSecureConnectionsConfirmationValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 89 ~ impl From for Vec { [INFO] [stdout] 90 | /// Create [`Vec`] from [`LeSecureConnectionsConfirmationValue`]. [INFO] [stdout] ... [INFO] [stdout] 119 | /// ``` [INFO] [stdout] 120 ~ fn from(val: LeSecureConnectionsConfirmationValue) -> Self { [INFO] [stdout] 121 | let mut data: Vec = Vec::new(); [INFO] [stdout] 122 ~ data.push(val.length); [INFO] [stdout] 123 ~ data.push(LeSecureConnectionsConfirmationValue::data_type()); [INFO] [stdout] 124 | data.append( [INFO] [stdout] 125 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_secure_connections_confirmation_value.rs:130:9 [INFO] [stdout] | [INFO] [stdout] 130 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 130 - return data; [INFO] [stdout] 130 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_secure_connections_random_value.rs:85:1 [INFO] [stdout] | [INFO] [stdout] 85 | impl Into> for LeSecureConnectionsRandomValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 85 ~ impl From for Vec { [INFO] [stdout] 86 | /// Create [`Vec`] from [`LeSecureConnectionsRandomValue`]. [INFO] [stdout] ... [INFO] [stdout] 110 | /// ``` [INFO] [stdout] 111 ~ fn from(val: LeSecureConnectionsRandomValue) -> Self { [INFO] [stdout] 112 | let mut data: Vec = Vec::new(); [INFO] [stdout] 113 ~ data.push(val.length); [INFO] [stdout] 114 ~ data.push(LeSecureConnectionsRandomValue::data_type()); [INFO] [stdout] 115 | data.append( [INFO] [stdout] 116 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_secure_connections_random_value.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 121 - return data; [INFO] [stdout] 121 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/le_supported_features.rs:32:39 [INFO] [stdout] | [INFO] [stdout] 32 | pub fn new(le_supported_features: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 32 ~ pub fn new(le_supported_features: &[bool]) -> Self { [INFO] [stdout] 33 | Self { [INFO] [stdout] 34 | length: 1 + le_supported_features.len() as u8 / 8, [INFO] [stdout] 35 ~ le_supported_features: le_supported_features.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `self.le_supported_features.get(0)` [INFO] [stdout] --> src/data_types/le_supported_features.rs:52:10 [INFO] [stdout] | [INFO] [stdout] 52 | *self.le_supported_features.get(0).unwrap_or(&false) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.le_supported_features.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_supported_features.rs:797:17 [INFO] [stdout] | [INFO] [stdout] 797 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 798 | | data.push(x & 0b0000_0001 != 0); [INFO] [stdout] 799 | | data.push(x & 0b0000_0010 != 0); [INFO] [stdout] 800 | | data.push(x & 0b0000_0100 != 0); [INFO] [stdout] ... | [INFO] [stdout] 804 | | data.push(x & 0b0100_0000 != 0); [INFO] [stdout] 805 | | data.push(x & 0b1000_0000 != 0); [INFO] [stdout] | |________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/le_supported_features.rs:816:1 [INFO] [stdout] | [INFO] [stdout] 816 | impl Into> for LeSupportedFeatures { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 816 ~ impl From for Vec { [INFO] [stdout] 817 | /// Create [`Vec`] from [`LeSupportedFeatures`]. [INFO] [stdout] ... [INFO] [stdout] 851 | /// ``` [INFO] [stdout] 852 ~ fn from(val: LeSupportedFeatures) -> Self { [INFO] [stdout] 853 | let mut data: Vec = Vec::new(); [INFO] [stdout] 854 ~ data.push(val.length); [INFO] [stdout] 855 ~ data.push(LeSupportedFeatures::data_type()); [INFO] [stdout] 856 ~ let mut le_supported_features: Vec = val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/le_supported_features.rs:874:9 [INFO] [stdout] | [INFO] [stdout] 874 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 874 - return data; [INFO] [stdout] 874 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/le_supported_features.rs:1295:21 [INFO] [stdout] | [INFO] [stdout] 1295 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 1296 | | data.push((x & 0b0000_0001) != 0); [INFO] [stdout] 1297 | | data.push((x & 0b0000_0010) != 0); [INFO] [stdout] 1298 | | data.push((x & 0b0000_0100) != 0); [INFO] [stdout] ... | [INFO] [stdout] 1302 | | data.push((x & 0b0100_0000) != 0); [INFO] [stdout] 1303 | | data.push((x & 0b1000_0000) != 0); [INFO] [stdout] | |______________________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/data_types/le_supported_features.rs:1336:21 [INFO] [stdout] | [INFO] [stdout] 1336 | u8_vec[i / 8] = u8_vec[i / 8] | 1 << i % 8 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `u8_vec[i / 8] |= 1 << i % 8` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 16 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:100:1 [INFO] [stdout] | [INFO] [stdout] 100 | impl Into> for ListOf128BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 100 ~ impl From for Vec { [INFO] [stdout] 101 | /// Create [`Vec`] from [`ListOf128BitServiceSolicitationUUIDs`]. [INFO] [stdout] ... [INFO] [stdout] 133 | /// ``` [INFO] [stdout] 134 ~ fn from(val: ListOf128BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 135 | let mut data: Vec = Vec::new(); [INFO] [stdout] 136 ~ data.push(val.length); [INFO] [stdout] 137 ~ data.push(ListOf128BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 138 | data.append( [INFO] [stdout] 139 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_128bit_service_solicitation_uuids.rs:146:9 [INFO] [stdout] | [INFO] [stdout] 146 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 146 - return data; [INFO] [stdout] 146 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:35:23 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: (uuids.len() * 2 + 1) as u8, [INFO] [stdout] 38 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:104:1 [INFO] [stdout] | [INFO] [stdout] 104 | impl Into> for ListOf16BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 104 ~ impl From for Vec { [INFO] [stdout] 105 | /// Create [`Vec`] from [ListOf16BitServiceSolicitationUUIDs]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: ListOf16BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(ListOf16BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 143 | data.append( [INFO] [stdout] 144 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 151 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 151 - return data; [INFO] [stdout] 151 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:214:40 [INFO] [stdout] | [INFO] [stdout] 214 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/list_of_16bit_service_solicitation_uuids.rs:247:40 [INFO] [stdout] | [INFO] [stdout] 247 | Uuid::from_fields(d1 | ((f[0] as u32) << 0) | ((f[1] as u32) << 8), d2, d3, d4) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((f[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:36:23 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuids: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuids: &[Uuid]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: (uuids.len() * 4 + 1) as u8, [INFO] [stdout] 39 ~ uuids: uuids.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:111:1 [INFO] [stdout] | [INFO] [stdout] 111 | impl Into> for ListOf32BitServiceSolicitationUUIDs { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 111 ~ impl From for Vec { [INFO] [stdout] 112 | /// Create [`Vec`] from [`ListOf32BitServiceSolicitationUUIDs`]. [INFO] [stdout] ... [INFO] [stdout] 149 | /// ``` [INFO] [stdout] 150 ~ fn from(val: ListOf32BitServiceSolicitationUUIDs) -> Self { [INFO] [stdout] 151 | let mut data: Vec = Vec::new(); [INFO] [stdout] 152 ~ data.push(val.length); [INFO] [stdout] 153 ~ data.push(ListOf32BitServiceSolicitationUUIDs::data_type()); [INFO] [stdout] 154 | data.append( [INFO] [stdout] 155 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/list_of_32bit_service_solicitation_uuids.rs:162:9 [INFO] [stdout] | [INFO] [stdout] 162 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 162 - return data; [INFO] [stdout] 162 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:37:69 [INFO] [stdout] | [INFO] [stdout] 37 | pub fn new(company_identifier: u16, manufacturer_specific_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 37 ~ pub fn new(company_identifier: u16, manufacturer_specific_data: &[u8]) -> Self { [INFO] [stdout] 38 | Self { [INFO] [stdout] 39 | length: 3 + manufacturer_specific_data.len() as u8, [INFO] [stdout] 40 | company_identifier, [INFO] [stdout] 41 ~ manufacturer_specific_data: manufacturer_specific_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:96:1 [INFO] [stdout] | [INFO] [stdout] 96 | impl Into> for ManufacturerSpecificData { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 96 ~ impl From for Vec { [INFO] [stdout] 97 | /// Create [`Vec`] from [`ManufacturerSpecificData`]. [INFO] [stdout] ... [INFO] [stdout] 124 | /// ``` [INFO] [stdout] 125 ~ fn from(val: ManufacturerSpecificData) -> Self { [INFO] [stdout] 126 | let mut data: Vec = Vec::new(); [INFO] [stdout] 127 ~ data.push(val.length); [INFO] [stdout] 128 ~ data.push(ManufacturerSpecificData::data_type()); [INFO] [stdout] 129 ~ data.append(&mut val.company_identifier.to_le_bytes().to_vec()); [INFO] [stdout] 130 ~ data.append(&mut val.manufacturer_specific_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return data; [INFO] [stdout] 131 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:191:63 [INFO] [stdout] | [INFO] [stdout] 191 | data.append(&mut u16::to_le_bytes(company_identifier).try_into().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `[u8; 2]` to `Vec` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] = note: `#[warn(clippy::unnecessary_fallible_conversions)]` on by default [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 191 - data.append(&mut u16::to_le_bytes(company_identifier).try_into().unwrap()); [INFO] [stdout] 191 + data.append(&mut u16::to_le_bytes(company_identifier).into()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of a fallible conversion when an infallible one could be used [INFO] [stdout] --> src/data_types/manufacturer_specific_data.rs:225:63 [INFO] [stdout] | [INFO] [stdout] 225 | data.append(&mut u16::to_le_bytes(company_identifier).try_into().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: converting `[u8; 2]` to `Vec` cannot fail [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions [INFO] [stdout] help: use [INFO] [stdout] | [INFO] [stdout] 225 - data.append(&mut u16::to_le_bytes(company_identifier).try_into().unwrap()); [INFO] [stdout] 225 + data.append(&mut u16::to_le_bytes(company_identifier).into()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[u8; 4]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:63:21 [INFO] [stdout] | [INFO] [stdout] 63 | rsp_aa: rsp_aa.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*rsp_aa` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:131:1 [INFO] [stdout] | [INFO] [stdout] 131 | impl Into> for PeriodicAdvertisingResponseTimingInformation { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 131 ~ impl From for Vec { [INFO] [stdout] 132 | /// Create [`Vec`] from [`PeriodicAdvertisingResponseTimingInformation`]. [INFO] [stdout] ... [INFO] [stdout] 169 | /// ``` [INFO] [stdout] 170 ~ fn from(val: PeriodicAdvertisingResponseTimingInformation) -> Self { [INFO] [stdout] 171 | let mut data: Vec = Vec::new(); [INFO] [stdout] 172 ~ data.push(val.length); [INFO] [stdout] 173 ~ data.push(PeriodicAdvertisingResponseTimingInformation::data_type()); [INFO] [stdout] 174 ~ data.append(&mut val.rsp_aa.clone().to_vec()); [INFO] [stdout] 175 ~ data.push(val.num_subevents); [INFO] [stdout] 176 ~ data.push(val.subevent_interval); [INFO] [stdout] 177 ~ data.push(val.response_slot_delay); [INFO] [stdout] 178 ~ data.push(val.response_slot_spacing); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/periodic_advertising_response_timing_information.rs:179:9 [INFO] [stdout] | [INFO] [stdout] 179 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 179 - return data; [INFO] [stdout] 179 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/peripheral_connection_interval_range.rs:190:1 [INFO] [stdout] | [INFO] [stdout] 190 | impl Into> for PeripheralConnectionIntervalRange { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 190 ~ impl From for Vec { [INFO] [stdout] 191 | /// Create [`Vec`] from [`PeripheralConnectionIntervalRange`]. [INFO] [stdout] ... [INFO] [stdout] 216 | /// ``` [INFO] [stdout] 217 ~ fn from(val: PeripheralConnectionIntervalRange) -> Self { [INFO] [stdout] 218 | let mut data: Vec = Vec::new(); [INFO] [stdout] 219 ~ data.push(val.length); [INFO] [stdout] 220 ~ data.push(PeripheralConnectionIntervalRange::data_type()); [INFO] [stdout] 221 ~ data.append(&mut val.minimum_value.to_le_bytes().to_vec()); [INFO] [stdout] 222 ~ data.append(&mut val.maximum_value.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/peripheral_connection_interval_range.rs:223:9 [INFO] [stdout] | [INFO] [stdout] 223 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 223 - return data; [INFO] [stdout] 223 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/public_target_address.rs:36:39 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(public_target_address: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(public_target_address: &[u64]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: public_target_address.len() as u8 * 6 + 1, [INFO] [stdout] 39 ~ public_target_address: public_target_address.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/public_target_address.rs:118:1 [INFO] [stdout] | [INFO] [stdout] 118 | impl Into> for PublicTargetAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 118 ~ impl From for Vec { [INFO] [stdout] 119 | /// Create [`Vec`] from [`PublicTargetAddress`]. [INFO] [stdout] ... [INFO] [stdout] 161 | /// ``` [INFO] [stdout] 162 ~ fn from(val: PublicTargetAddress) -> Self { [INFO] [stdout] 163 | let mut data: Vec = Vec::new(); [INFO] [stdout] 164 ~ data.push(val.length); [INFO] [stdout] 165 ~ data.push(PublicTargetAddress::data_type()); [INFO] [stdout] 166 | data.append( [INFO] [stdout] 167 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/public_target_address.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 175 - return data; [INFO] [stdout] 175 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/random_target_address.rs:35:39 [INFO] [stdout] | [INFO] [stdout] 35 | pub fn new(random_target_address: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 35 ~ pub fn new(random_target_address: &[u64]) -> Self { [INFO] [stdout] 36 | Self { [INFO] [stdout] 37 | length: random_target_address.len() as u8 * 6 + 1, [INFO] [stdout] 38 ~ random_target_address: random_target_address.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/random_target_address.rs:117:1 [INFO] [stdout] | [INFO] [stdout] 117 | impl Into> for RandomTargetAddress { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 117 ~ impl From for Vec { [INFO] [stdout] 118 | /// Create [`Vec`] from [`RandomTargetAddress`]. [INFO] [stdout] ... [INFO] [stdout] 160 | /// ``` [INFO] [stdout] 161 ~ fn from(val: RandomTargetAddress) -> Self { [INFO] [stdout] 162 | let mut data: Vec = Vec::new(); [INFO] [stdout] 163 ~ data.push(val.length); [INFO] [stdout] 164 ~ data.push(RandomTargetAddress::data_type()); [INFO] [stdout] 165 | data.append( [INFO] [stdout] 166 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/random_target_address.rs:174:9 [INFO] [stdout] | [INFO] [stdout] 174 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 174 - return data; [INFO] [stdout] 174 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c192.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecureSimplePairingHashC192 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecureSimplePairingHashC192`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecureSimplePairingHashC192) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecureSimplePairingHashC192::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.secure_simple_pairing_hash_c192.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c192.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c256.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecureSimplePairingHashC256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecureSimplePairingHashC256`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecureSimplePairingHashC256) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecureSimplePairingHashC256::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.secure_simple_pairing_hash_c256.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_hash_c256.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r192.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | impl Into> for SecureSimplePairingRandomizerR192 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 84 ~ impl From for Vec { [INFO] [stdout] 85 | /// Create [`Vec`] from [SecureSimplePairingRandomizerR192]. [INFO] [stdout] ... [INFO] [stdout] 109 | /// ``` [INFO] [stdout] 110 ~ fn from(val: SecureSimplePairingRandomizerR192) -> Self { [INFO] [stdout] 111 | let mut data: Vec = Vec::new(); [INFO] [stdout] 112 ~ data.push(val.length); [INFO] [stdout] 113 ~ data.push(SecureSimplePairingRandomizerR192::data_type()); [INFO] [stdout] 114 | data.append( [INFO] [stdout] 115 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r192.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 120 - return data; [INFO] [stdout] 120 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r256.rs:84:1 [INFO] [stdout] | [INFO] [stdout] 84 | impl Into> for SecureSimplePairingRandomizerR256 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 84 ~ impl From for Vec { [INFO] [stdout] 85 | /// Create [`Vec`] from [`SecureSimplePairingRandomizerR256`]. [INFO] [stdout] ... [INFO] [stdout] 109 | /// ``` [INFO] [stdout] 110 ~ fn from(val: SecureSimplePairingRandomizerR256) -> Self { [INFO] [stdout] 111 | let mut data: Vec = Vec::new(); [INFO] [stdout] 112 ~ data.push(val.length); [INFO] [stdout] 113 ~ data.push(SecureSimplePairingRandomizerR256::data_type()); [INFO] [stdout] 114 | data.append( [INFO] [stdout] 115 ~ &mut val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/secure_simple_pairing_randomizer_r256.rs:120:9 [INFO] [stdout] | [INFO] [stdout] 120 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 120 - return data; [INFO] [stdout] 120 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `[bool; 8]` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/security_manager_oob.rs:41:35 [INFO] [stdout] | [INFO] [stdout] 41 | security_manager_oob: security_manager_oob.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*security_manager_oob` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/security_manager_oob.rs:206:1 [INFO] [stdout] | [INFO] [stdout] 206 | impl Into> for SecurityManagerOutOfBand { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 206 ~ impl From for Vec { [INFO] [stdout] 207 | /// Create [`Vec`] from [`SecurityManagerOutOfBand`]. [INFO] [stdout] ... [INFO] [stdout] 297 | /// ``` [INFO] [stdout] 298 ~ fn from(val: SecurityManagerOutOfBand) -> Self { [INFO] [stdout] 299 | let mut data: Vec = Vec::new(); [INFO] [stdout] 300 ~ data.push(val.length); [INFO] [stdout] 301 ~ data.push(SecurityManagerOutOfBand::data_type()); [INFO] [stdout] 302 | [INFO] [stdout] 303 | let mut security_manager_oob = 0u8; [INFO] [stdout] 304 ~ if val.security_manager_oob[0] { [INFO] [stdout] 305 | security_manager_oob |= SECURITY_MANAGER_OUT_OF_BAND_FLAG_OOB_FLAGS; [INFO] [stdout] 306 | } [INFO] [stdout] 307 ~ if val.security_manager_oob[1] { [INFO] [stdout] 308 | security_manager_oob |= SECURITY_MANAGER_LE_SUPPORTED; [INFO] [stdout] 309 | } [INFO] [stdout] 310 ~ if val.security_manager_oob[3] { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/security_manager_oob.rs:314:9 [INFO] [stdout] | [INFO] [stdout] 314 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 314 - return data; [INFO] [stdout] 314 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/security_manager_oob.rs:421:9 [INFO] [stdout] | [INFO] [stdout] 421 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 422 | | data.push(length); [INFO] [stdout] 423 | | data.push(SecurityManagerOutOfBand::data_type()); [INFO] [stdout] 424 | | data.push(security_manager_oob_byte); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/security_manager_oob.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 437 | | data.push(length); [INFO] [stdout] 438 | | data.push(SecurityManagerOutOfBand::data_type()); [INFO] [stdout] 439 | | data.push(security_manager_oob_byte); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/security_manager_oob.rs:451:9 [INFO] [stdout] | [INFO] [stdout] 451 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 452 | | data.push(length); [INFO] [stdout] 453 | | data.push(SecurityManagerOutOfBand::data_type()); [INFO] [stdout] 454 | | data.push(security_manager_oob_byte); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/security_manager_tk_value.rs:82:1 [INFO] [stdout] | [INFO] [stdout] 82 | impl Into> for SecurityManagerTkValue { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 82 ~ impl From for Vec { [INFO] [stdout] 83 | /// Create [`Vec`] from [`SecurityManagerTkValue`]. [INFO] [stdout] ... [INFO] [stdout] 107 | /// ``` [INFO] [stdout] 108 ~ fn from(val: SecurityManagerTkValue) -> Self { [INFO] [stdout] 109 | let mut data: Vec = Vec::new(); [INFO] [stdout] 110 ~ data.push(val.length); [INFO] [stdout] 111 ~ data.push(SecurityManagerTkValue::data_type()); [INFO] [stdout] 112 ~ data.append(&mut val.security_manager_tk_value.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/security_manager_tk_value.rs:113:9 [INFO] [stdout] | [INFO] [stdout] 113 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 113 - return data; [INFO] [stdout] 113 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 17 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:95:1 [INFO] [stdout] | [INFO] [stdout] 95 | impl Into> for ServiceData128BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 95 ~ impl From for Vec { [INFO] [stdout] 96 | /// Create [`Vec`] from [`ServiceData128BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 124 | /// ``` [INFO] [stdout] 125 ~ fn from(val: ServiceData128BitUUID) -> Self { [INFO] [stdout] 126 | let mut data: Vec = Vec::new(); [INFO] [stdout] 127 ~ data.push(val.length); [INFO] [stdout] 128 ~ data.push(ServiceData128BitUUID::data_type()); [INFO] [stdout] 129 ~ data.append(&mut val.uuid.as_u128().to_le_bytes().to_vec()); [INFO] [stdout] 130 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_128bit_uuid.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 131 - return data; [INFO] [stdout] 131 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 3 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:103:1 [INFO] [stdout] | [INFO] [stdout] 103 | impl Into> for ServiceData16BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 103 ~ impl From for Vec { [INFO] [stdout] 104 | /// Create [`Vec`] from [`ServiceData16BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: ServiceData16BitUUID) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(ServiceData16BitUUID::data_type()); [INFO] [stdout] 143 ~ data.append(&mut val.uuid.to_bytes_le()[..2].to_vec()); [INFO] [stdout] 144 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:145:9 [INFO] [stdout] | [INFO] [stdout] 145 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 145 - return data; [INFO] [stdout] 145 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:203:18 [INFO] [stdout] | [INFO] [stdout] 203 | d1 | ((uuid_bytes[0] as u32) << 0) | ((uuid_bytes[1] as u32) << 8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((uuid_bytes[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/data_types/service_data_16bit_uuid.rs:238:18 [INFO] [stdout] | [INFO] [stdout] 238 | d1 | ((uuid_bytes[0] as u32) << 0) | ((uuid_bytes[1] as u32) << 8), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `((uuid_bytes[0] as u32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:36:54 [INFO] [stdout] | [INFO] [stdout] 36 | pub fn new(uuid: &Uuid, additional_service_data: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 36 ~ pub fn new(uuid: &Uuid, additional_service_data: &[u8]) -> Self { [INFO] [stdout] 37 | Self { [INFO] [stdout] 38 | length: 5 + additional_service_data.len() as u8, [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] 40 ~ additional_service_data: additional_service_data.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Uuid` which implements the `Copy` trait [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:39:19 [INFO] [stdout] | [INFO] [stdout] 39 | uuid: uuid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^ help: try dereferencing it: `*uuid` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:101:1 [INFO] [stdout] | [INFO] [stdout] 101 | impl Into> for ServiceData32BitUUID { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 101 ~ impl From for Vec { [INFO] [stdout] 102 | /// Create [`Vec`] from [`ServiceData32BitUUID`]. [INFO] [stdout] ... [INFO] [stdout] 132 | /// ``` [INFO] [stdout] 133 ~ fn from(val: ServiceData32BitUUID) -> Self { [INFO] [stdout] 134 | let mut data: Vec = Vec::new(); [INFO] [stdout] 135 ~ data.push(val.length); [INFO] [stdout] 136 ~ data.push(ServiceData32BitUUID::data_type()); [INFO] [stdout] 137 ~ data.append(&mut val.uuid.to_bytes_le()[..4].to_vec()); [INFO] [stdout] 138 ~ data.append(&mut val.additional_service_data.clone()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/service_data_32bit_uuid.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 139 - return data; [INFO] [stdout] 139 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/shortened_local_name.rs:31:21 [INFO] [stdout] | [INFO] [stdout] 31 | length: shortened_local_name.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `shortened_local_name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/shortened_local_name.rs:81:1 [INFO] [stdout] | [INFO] [stdout] 81 | impl Into> for ShortenedLocalName { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 81 ~ impl From for Vec { [INFO] [stdout] 82 | /// Create [`Vec`] from [`ShortenedLocalName`]. [INFO] [stdout] ... [INFO] [stdout] 105 | /// ``` [INFO] [stdout] 106 ~ fn from(val: ShortenedLocalName) -> Self { [INFO] [stdout] 107 | let mut data: Vec = Vec::new(); [INFO] [stdout] 108 ~ data.push(val.length); [INFO] [stdout] 109 ~ data.push(ShortenedLocalName::data_type()); [INFO] [stdout] 110 ~ data.append(&mut val.shortened_local_name.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/shortened_local_name.rs:111:9 [INFO] [stdout] | [INFO] [stdout] 111 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 111 - return data; [INFO] [stdout] 111 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/shortened_local_name.rs:153:20 [INFO] [stdout] | [INFO] [stdout] 153 | assert_eq!(name.as_bytes().len() as u8 + 1, result.length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/shortened_local_name.rs:160:22 [INFO] [stdout] | [INFO] [stdout] 160 | let length = name.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/shortened_local_name.rs:188:19 [INFO] [stdout] | [INFO] [stdout] 188 | data.push(name.as_bytes().len() as u8 + 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `name.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/tx_power_level.rs:97:1 [INFO] [stdout] | [INFO] [stdout] 97 | impl Into> for TxPowerLevel { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 97 ~ impl From for Vec { [INFO] [stdout] 98 | /// Create [`Vec`] from [`TxPowerLevel`]. [INFO] [stdout] ... [INFO] [stdout] 138 | /// ``` [INFO] [stdout] 139 ~ fn from(val: TxPowerLevel) -> Self { [INFO] [stdout] 140 | let mut data: Vec = Vec::new(); [INFO] [stdout] 141 ~ data.push(val.length); [INFO] [stdout] 142 ~ data.push(TxPowerLevel::data_type()); [INFO] [stdout] 143 ~ data.push(val.tx_power_level as u8); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/tx_power_level.rs:144:9 [INFO] [stdout] | [INFO] [stdout] 144 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 144 - return data; [INFO] [stdout] 144 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 141 | | data.push(self.length); [INFO] [stdout] 142 | | data.push(Self::data_type()); [INFO] [stdout] 143 | | data.push(self.tx_power_level as u8); [INFO] [stdout] | |_____________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:199:9 [INFO] [stdout] | [INFO] [stdout] 199 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 200 | | data.push(length); [INFO] [stdout] 201 | | data.push(TxPowerLevel::data_type()); [INFO] [stdout] 202 | | data.push(tx_power_level as u8); [INFO] [stdout] | |________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 213 | | data.push(length); [INFO] [stdout] 214 | | data.push(TxPowerLevel::data_type()); [INFO] [stdout] 215 | | data.push(tx_power_level as u8); [INFO] [stdout] | |________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:238:9 [INFO] [stdout] | [INFO] [stdout] 238 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 239 | | data.push(2); [INFO] [stdout] 240 | | data.push(TxPowerLevel::data_type()); [INFO] [stdout] 241 | | data.push(tx_power_level as u8); [INFO] [stdout] | |________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/data_types/tx_power_level.rs:255:9 [INFO] [stdout] | [INFO] [stdout] 255 | / let mut data: Vec = Vec::new(); [INFO] [stdout] 256 | | data.push(2); [INFO] [stdout] 257 | | data.push(TxPowerLevel::data_type()); [INFO] [stdout] 258 | | data.push(tx_power_level as u8); [INFO] [stdout] | |________________________________________^ help: consider using the `vec![]` macro: `let data: Vec = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:44:21 [INFO] [stdout] | [INFO] [stdout] 44 | length: uniform_resource_identifier.as_bytes().len() as u8 + 1, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uniform_resource_identifier.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:116:1 [INFO] [stdout] | [INFO] [stdout] 116 | impl Into> for UniformResourceIdentifier { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 116 ~ impl From for Vec { [INFO] [stdout] 117 | /// Create [`Vec`] from [`UniformResourceIdentifier`]. [INFO] [stdout] ... [INFO] [stdout] 163 | /// ``` [INFO] [stdout] 164 ~ fn from(val: UniformResourceIdentifier) -> Self { [INFO] [stdout] 165 | let mut data: Vec = Vec::new(); [INFO] [stdout] 166 ~ data.push(val.length); [INFO] [stdout] 167 ~ data.push(UniformResourceIdentifier::data_type()); [INFO] [stdout] 168 ~ data.append(&mut String::from(val.scheme).into_bytes()); [INFO] [stdout] 169 ~ data.append(&mut val.uniform_resource_identifier.clone().into_bytes()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:170:9 [INFO] [stdout] | [INFO] [stdout] 170 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 170 - return data; [INFO] [stdout] 170 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | assert_eq!(uri.as_bytes().len() as u8 + 1, result.length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:222:20 [INFO] [stdout] | [INFO] [stdout] 222 | assert_eq!(uri.as_bytes().len() as u8 + 1, result.length); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:232:22 [INFO] [stdout] | [INFO] [stdout] 232 | let length = uri.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:248:22 [INFO] [stdout] | [INFO] [stdout] 248 | let length = uri.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:276:22 [INFO] [stdout] | [INFO] [stdout] 276 | let length = uri.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needless call to `as_bytes` [INFO] [stdout] --> src/data_types/uniform_resource_identifier.rs:296:22 [INFO] [stdout] | [INFO] [stdout] 296 | let length = uri.as_bytes().len() as u8 + 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `uri.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_extended_properties.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for CharacteristicExtendedProperties { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`CharacteristicExtendedProperties`]. [INFO] [stdout] ... [INFO] [stdout] 125 | /// ``` [INFO] [stdout] 126 ~ fn from(val: CharacteristicExtendedProperties) -> Self { [INFO] [stdout] 127 ~ u16::to_le_bytes(val.properties).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/characteristic_extended_properties.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_user_description.rs:54:1 [INFO] [stdout] | [INFO] [stdout] 54 | impl Into> for CharacteristicUserDescription { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 54 ~ impl From for Vec { [INFO] [stdout] 55 | /// Create [`Vec`] from [`CharacteristicUserDescription`]. [INFO] [stdout] ... [INFO] [stdout] 68 | /// ``` [INFO] [stdout] 69 ~ fn from(val: CharacteristicUserDescription) -> Self { [INFO] [stdout] 70 ~ val.description.clone().into_bytes() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/client_characteristic_configuration.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for ClientCharacteristicConfiguration { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`ClientCharacteristicConfiguration`]. [INFO] [stdout] ... [INFO] [stdout] 125 | /// ``` [INFO] [stdout] 126 ~ fn from(val: ClientCharacteristicConfiguration) -> Self { [INFO] [stdout] 127 ~ u16::to_le_bytes(val.configuration).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/client_characteristic_configuration.rs:187:17 [INFO] [stdout] | [INFO] [stdout] 187 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/server_characteristic_configuration.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 80 | impl Into> for ServerCharacteristicConfiguration { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 80 ~ impl From for Vec { [INFO] [stdout] 81 | /// Create [`Vec`] from [`ServerCharacteristicConfiguration`]. [INFO] [stdout] ... [INFO] [stdout] 94 | /// ``` [INFO] [stdout] 95 ~ fn from(val: ServerCharacteristicConfiguration) -> Self { [INFO] [stdout] 96 ~ u16::to_le_bytes(val.configuration).to_vec() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/server_characteristic_configuration.rs:146:17 [INFO] [stdout] | [INFO] [stdout] 146 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_presentation_format.rs:106:1 [INFO] [stdout] | [INFO] [stdout] 106 | impl Into> for CharacteristicPresentationFormat { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 106 ~ impl From for Vec { [INFO] [stdout] 107 | /// Create [`Vec`] from [`CharacteristicPresentationFormat`]. [INFO] [stdout] ... [INFO] [stdout] 132 | /// ``` [INFO] [stdout] 133 ~ fn from(val: CharacteristicPresentationFormat) -> Self { [INFO] [stdout] 134 | let mut data: Vec = Vec::new(); [INFO] [stdout] 135 ~ data.push(val.format); [INFO] [stdout] 136 ~ data.push(val.exponent as u8); [INFO] [stdout] 137 ~ data.append(&mut val.unit.to_le_bytes().to_vec()); [INFO] [stdout] 138 ~ data.push(val.name_space); [INFO] [stdout] 139 ~ data.append(&mut val.description.to_le_bytes().to_vec()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/descriptors/characteristic_presentation_format.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | return data; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 140 - return data; [INFO] [stdout] 140 + data [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/characteristic_presentation_format.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:26:43 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn new(list_of_attribute_handles: &Vec) -> Self { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 26 ~ pub fn new(list_of_attribute_handles: &[u16]) -> Self { [INFO] [stdout] 27 | Self { [INFO] [stdout] 28 ~ list_of_attribute_handles: list_of_attribute_handles.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:83:1 [INFO] [stdout] | [INFO] [stdout] 83 | impl Into> for CharacteristicAggregateFormat { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 83 ~ impl From for Vec { [INFO] [stdout] 84 | /// Create [`Vec`] from [`CharacteristicAggregateFormat`]. [INFO] [stdout] ... [INFO] [stdout] 103 | /// ``` [INFO] [stdout] 104 ~ fn from(val: CharacteristicAggregateFormat) -> Self { [INFO] [stdout] 105 ~ return val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:105:9 [INFO] [stdout] | [INFO] [stdout] 105 | / return self [INFO] [stdout] 106 | | .list_of_attribute_handles [INFO] [stdout] 107 | | .clone() [INFO] [stdout] 108 | | .iter() [INFO] [stdout] 109 | | .flat_map(|f| f.to_le_bytes()) [INFO] [stdout] 110 | | .collect(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 105 ~ self [INFO] [stdout] 106 + .list_of_attribute_handles [INFO] [stdout] 107 + .clone() [INFO] [stdout] 108 + .iter() [INFO] [stdout] 109 + .flat_map(|f| f.to_le_bytes()) [INFO] [stdout] 110 ~ .collect() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:162:17 [INFO] [stdout] | [INFO] [stdout] 162 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/descriptors/characteristic_aggregate_format.rs:165:17 [INFO] [stdout] | [INFO] [stdout] 165 | assert!(!result.is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `result.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 9.81s [INFO] running `Command { std: "docker" "inspect" "d36f81eea520b53926c3d4ff68a3eea0207832e4eb9a6e517c26e6146d7bd936", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "d36f81eea520b53926c3d4ff68a3eea0207832e4eb9a6e517c26e6146d7bd936", kill_on_drop: false }` [INFO] [stdout] d36f81eea520b53926c3d4ff68a3eea0207832e4eb9a6e517c26e6146d7bd936