mirror of
https://github.com/epi052/feroxbuster.git
synced 2026-06-02 05:41:13 -03:00
clippy and fixed failing doctest
This commit is contained in:
@@ -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?
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user