Repository navigation
Commit 013fc42
committed
refactor: ConnectParams::prompter hands back an owned Arc
The accessor returned Option<&dyn Prompter>, a borrow that ends with the
connect call it arrived on. The prompter routinely outlives that call: an
interactive authentication flow gives it to the client library that will
present the URL, and a driver caching the resulting credential keeps it for
the life of the process.
A backend could not use what it was handed, only observe it, and would have
had to substitute an equivalent of its own -- the same object by luck rather
than by construction, and one that would silently stop being the same the day
core wraps what a driver declared.
Nothing outside core consumed this yet, so the type change costs no migration.1 parent 995beb9 commit 013fc42
2 files changed
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
333 | 341 | | |
334 | | - | |
335 | | - | |
| 342 | + | |
| 343 | + | |
336 | 344 | | |
337 | 345 | | |
338 | 346 | | |
| |||
0 commit comments