Closed MathiasKoch closed 3 years ago
Merging #38 (3514d17) into master (724bc9a) will not change coverage. The diff coverage is
50.00%
.
@@ Coverage Diff @@
## master #38 +/- ##
=======================================
Coverage 41.73% 41.73%
=======================================
Files 13 13
Lines 1174 1174
Branches 297 296 -1
=======================================
Hits 490 490
Misses 545 545
Partials 139 139
Impacted Files | Coverage Δ | |
---|---|---|
mqttrust_core/src/state.rs | 58.10% <ø> (ø) |
|
mqttrust_core/src/eventloop.rs | 38.23% <50.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 724bc9a...3514d17. Read the comment docs.
Add ?Sized trait bound to all places requiring embedded-nal traits, to relax sized requirement of mutable reference.
I recently ran into an issue where i had a closure of signature
F: FnOnce(&mut dyn TcpClientStack<TcpSocket = Handle, Error = Error>)
, which removes the sized property of theTcpClientStack
implementor.This means that a
&mut dyn TcpClientStack<TcpSocket = Handle, Error = Error>
cannot be used in places likefn foo<T: TcpClientStack>(network: &mut T) { ... }
without relaxing the requirement onSized
asfn foo<T: TcpClientStack + ?Sized>(network: &mut T) { ... }
.This PR adds those
?Sized
, as we are not storing the references anywhere anyways.