Closed de-sh closed 7 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
rumqttc/src/mqttbytes/mod.rs | 0 | 1 | 0.0% | ||
rumqttc/src/v5/mqttbytes/mod.rs | 0 | 1 | 0.0% | ||
rumqttc/src/framed.rs | 19 | 21 | 90.48% | ||
rumqttc/src/mqttbytes/v4/codec.rs | 29 | 31 | 93.55% | ||
rumqttc/src/proxy.rs | 0 | 3 | 0.0% | ||
rumqttc/src/tls.rs | 0 | 3 | 0.0% | ||
rumqttc/src/mqttbytes/v4/connack.rs | 0 | 6 | 0.0% | ||
rumqttc/src/v5/mqttbytes/v5/connect.rs | 0 | 6 | 0.0% | ||
rumqttc/src/v5/mqttbytes/v5/ping.rs | 0 | 6 | 0.0% | ||
rumqttc/src/v5/mqttbytes/v5/codec.rs | 22 | 31 | 70.97% | ||
<!-- | Total: | 274 | 519 | 52.79% | --> |
Files with Coverage Reduction | New Missed Lines | % | ||
---|---|---|---|---|
rumqttc/src/lib.rs | 1 | 64.32% | ||
rumqttc/src/mqttbytes/mod.rs | 3 | 86.27% | ||
rumqttc/src/v5/state.rs | 5 | 68.42% | ||
rumqttc/src/state.rs | 11 | 79.36% | ||
rumqttc/src/mqttbytes/v4/pubcomp.rs | 18 | 8.33% | ||
rumqttc/src/mqttbytes/v4/pubrel.rs | 18 | 8.11% | ||
rumqttc/src/mqttbytes/v4/pubrec.rs | 18 | 8.11% | ||
<!-- | Total: | 74 | --> |
Totals | |
---|---|
Change from base Build 8243857492: | -0.3% |
Covered Lines: | 6239 |
Relevant Lines: | 16624 |
Is there a follow up to this PR already planned?
Thanks for the suggestions, have opened #826 to resolve this, please review!
Merging this, no functional changes included in this PR
After it's merged, some incoming messages disappear in event loop, please help to check.
asyncpubsub_v5 output before the merge:
Running `target/debug/examples/asyncpubsub_v5`
Event = Incoming(ConnAck(ConnAck { session_present: false, code: Success, properties: Some(ConnAckProperties { session_expiry_interval: None, receive_max: Some(20), max_qos: None, retain_available: None, max_packet_size: None, assigned_client_identifier: None, topic_alias_max: Some(10), reason_string: None, user_properties: [], wildcard_subscription_available: None, subscription_identifiers_available: None, shared_subscription_available: None, server_keep_alive: None, response_information: None, server_reference: None, authentication_method: None, authentication_data: None }) }))
Event = Outgoing(Subscribe(1))
Event = Outgoing(Publish(2))
Event = Incoming(SubAck(SubAck { pkid: 1, return_codes: [Success(AtMostOnce)], properties: None }))
Event = Outgoing(PubRel(2))
Event = Incoming(PubRec(PubRec { pkid: 2, reason: Success, properties: None }))
Event = Incoming(Publish(Publish { dup: false, qos: AtMostOnce, retain: false, topic: b"hello/world", pkid: 0, payload: b"\x01", properties: None }))
asyncpubsub_v5 output after merge:
Running `target/debug/examples/asyncpubsub_v5`
Event = Incoming(ConnAck(ConnAck { session_present: false, code: Success, properties: Some(ConnAckProperties { session_expiry_interval: None, receive_max: Some(20), max_qos: None, retain_available: None, max_packet_size: None, assigned_client_identifier: None, topic_alias_max: Some(10), reason_string: None, user_properties: [], wildcard_subscription_available: None, subscription_identifiers_available: None, shared_subscription_available: None, server_keep_alive: None, response_information: None, server_reference: None, authentication_method: None, authentication_data: None }) }))
Event = Outgoing(Subscribe(1))
Event = Outgoing(Publish(2))
Event = Outgoing(Publish(3))
Event = Outgoing(Publish(4))
Thanks for pointing this out @xiaocq2001 there is the lack of a good testsuite for v5, might be a good issue to open!
As discussed in #814 this simplifies
Network
usingFramed
andCodec
Type of change
mqttbytes::Error
is no longerClone, Copy, PartialEq, Eq
and 2 new variants, for io and packet size limitNetwork
, which might lead to issues with packets in the buffer being dropped when an error is faced. But this seems like premature-optimization to be frankChecklist:
cargo fmt
CHANGELOG.md
if it's relevant to the users of the library. If it's not relevant mention why.