Merge pull request #2733 from influxdata/dom/cloneable-iox-client-builder

refactor: derive Clone for IOx client builder
pull/24376/head
kodiakhq[bot] 2021-10-05 13:57:38 +00:00 committed by GitHub
commit d50f41c427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 1 deletions

View File

@ -68,7 +68,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
/// .expect("connection must succeed");
/// # }
/// ```
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct Builder {
user_agent: String,
headers: Vec<(HeaderName, HeaderValue)>,
@ -171,3 +171,15 @@ impl Builder {
Self { timeout, ..self }
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_builder_cloneable() {
// Clone is used by Conductor.
fn assert_clone<T: Clone>(_t: T) {}
assert_clone(Builder::default())
}
}