Skip to content
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.

Split suspendUntilConnectionState into specialized functions #70

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

twyatt
Copy link
Member

@twyatt twyatt commented May 29, 2020

Having a function specific for suspension while waiting for connect and disconnect allowed for more informative logging and more readable code.

For example, reaching a disconnected state is only a failure while suspending until a connected state (so it just complicated the function when the function was used for disconnect).

@twyatt twyatt force-pushed the twyatt/suspendUntil branch from 2dee5b9 to 65a358e Compare May 29, 2020 19:28
@codecov
Copy link

codecov bot commented May 29, 2020

Codecov Report

Merging #70 into develop will increase coverage by 0.05%.
The diff coverage is 92.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop      #70      +/-   ##
=============================================
+ Coverage      83.18%   83.23%   +0.05%     
- Complexity        55       57       +2     
=============================================
  Files             14       14              
  Lines            339      352      +13     
  Branches          32       34       +2     
=============================================
+ Hits             282      293      +11     
  Misses            48       48              
- Partials           9       11       +2     
Impacted Files Coverage Δ Complexity Δ
core/src/main/java/gatt/GattConnection.kt 100.00% <ø> (ø) 0.00 <0.00> (ø)
core/src/main/java/device/CoroutinesDevice.kt 96.77% <90.90%> (-3.23%) 5.00 <1.00> (+1.00) ⬇️
core/src/main/java/gatt/CoroutinesGatt.kt 58.82% <92.85%> (+11.45%) 11.00 <1.00> (+1.00)

@twyatt twyatt added this to the 1.0.0 milestone May 29, 2020
@twyatt twyatt marked this pull request as ready for review May 30, 2020 08:56
Base automatically changed from twyatt/Exception to develop June 2, 2020 20:31
Having a function specific for suspension while waiting for connect and
disconnect allowed for more informative logging and more readable code.

For example, reaching a disconnected state is only a failure while
suspending until a connected state.
@twyatt twyatt force-pushed the twyatt/suspendUntil branch from 65a358e to 69f540e Compare June 3, 2020 03:18
@twyatt twyatt merged commit 2038d61 into develop Jun 3, 2020
@twyatt twyatt deleted the twyatt/suspendUntil branch June 3, 2020 03:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants