Commit 5de6cfb
Provide a variant of Card::transaction, which returns self on error.
- Add Card::transaction2, which is like `Card::transaction`, but
also returns the reference to `self` on error.
When starting a transaction, it is necessary to deal with
transient errors, like `Error::ResetCard`, by reconnecting to the
card, and retrying the transaction. When this functionality is
wrapped in a function , this doesn't work, because mutable
references can't be reborrowed. This function returns the
reference, which allows this construct.
- Fixes #25.1 parent 76c2b7f commit 5de6cfb
1 file changed
+25
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
| 1176 | + | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
1176 | 1201 | | |
1177 | 1202 | | |
1178 | 1203 | | |
| |||
0 commit comments