clippy and fixed failing doctest

This commit is contained in:
epi
2025-12-13 06:52:10 -05:00
parent b88c11f9a2
commit 2847b624ab
2 changed files with 3 additions and 3 deletions

View File

@@ -556,9 +556,9 @@ async fn wrapped_main(config: Arc<Configuration>) -> Result<()> {
let live_targets = {
let test = heuristics::HeuristicTests::new(handles.clone());
let result = test.connectivity(&targets).await;
if result.is_err() {
if let Err(err) = result {
clean_up(handles, tasks).await?;
bail!(fmt_err(&result.unwrap_err().to_string()));
bail!(fmt_err(&err.to_string()));
}
result?
};

View File

@@ -183,7 +183,7 @@ impl DynamicSemaphore {
/// Ok(permit) => println!("Got permit"),
/// Err(TryAcquireError::NoPermits) => println!("No permits available"),
/// Err(TryAcquireError::Closed) => println!("Semaphore closed"),
/// }
/// };
/// ```
pub fn try_acquire(&self) -> Result<DynamicSemaphorePermit<'_>, tokio::sync::TryAcquireError> {
// Check if we're already at or over capacity