Remove and return the link for `db_id`, if any.
(&self, db_id: DatabaseId)
| 81 | |
| 82 | /// Remove and return the link for `db_id`, if any. |
| 83 | pub fn remove(&self, db_id: DatabaseId) -> Option<Arc<CrossClusterLink>> { |
| 84 | let mut w = self.entries.write().unwrap_or_else(|p| p.into_inner()); |
| 85 | w.remove(&db_id.as_u64()).map(|e| e.link.clone()) |
| 86 | } |
| 87 | |
| 88 | /// Look up the link for `db_id` without removing it. |
| 89 | pub fn get(&self, db_id: DatabaseId) -> Option<Arc<CrossClusterLink>> { |
no test coverage detected