Merge pull request #2733 from influxdata/dom/cloneable-iox-client-builder
refactor: derive Clone for IOx client builderpull/24376/head
commit
d50f41c427
|
@ -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())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue