Skip to content

Commit

Permalink
Merge pull request #242 from Fishrock123/ignore-clippy-rc-buffer
Browse files Browse the repository at this point in the history
client: ignore rc_buffer clippy warning
  • Loading branch information
Fishrock123 authored Sep 27, 2020
2 parents 4d97d6d + a30be46 commit 295d1d7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ pub struct Client {
base_url: Option<Url>,
http_client: Arc<dyn HttpClient>,
/// Holds the middleware stack.
///
/// Note(Fishrock123): We do actually want this structure.
/// The outer Arc allows us to clone in .send() without cloning the array.
/// The Vec allows us to add middleware at runtime.
/// The inner Arc-s allow us to implement Clone without sharing the vector with the parent.
/// We don't use a Mutex around the Vec here because adding a middleware during execution should be an error.
#[allow(clippy::rc_buffer)]
middleware: Arc<Vec<Arc<dyn Middleware>>>,
}

Expand Down

0 comments on commit 295d1d7

Please sign in to comment.