Commit ffee7df
committed
Use ok_or_else for lazy error logging in DNS resolution
Optimizes the DNS resolver setup by deferring log execution until an
actual failure occurs.
Changes:
- Replaced `ok_or` with `ok_or_else` when resolving DNS server
addresses.
evaluation and unnecessary string formatting on successful builds.
This ensures that logging overhead and string interpolation are only
incurred during error states, rather than being evaluated on every
successful initialization.1 parent 403ced3 commit ffee7df
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1757 | 1757 | | |
1758 | 1758 | | |
1759 | 1759 | | |
1760 | | - | |
| 1760 | + | |
1761 | 1761 | | |
1762 | 1762 | | |
1763 | 1763 | | |
| |||
0 commit comments