(handle: u32, f: impl FnOnce(&Dsn) -> anyhow::Result<T>)
| 289 | } |
| 290 | |
| 291 | fn with_dsn<T>(handle: u32, f: impl FnOnce(&Dsn) -> anyhow::Result<T>) -> anyhow::Result<T> { |
| 292 | DSN_MAP |
| 293 | .get(&handle) |
| 294 | .map(|r| f(r.value())) |
| 295 | .context("dsn not exists")? |
| 296 | } |
| 297 | |
| 298 | #[derive(Debug, Clone)] |
| 299 | struct Dsn { |
no outgoing calls
no test coverage detected