Skip to content

Commit bcc4c0f

Browse files
authored
Derive Clone on Bulk request structs (#202)
1 parent 0c92c3a commit bcc4c0f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

elasticsearch/src/root/bulk.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ enum BulkAction {
4848
///
4949
/// the specific bulk action metadata such as the id of the source document, index, etc.
5050
#[serde_with::skip_serializing_none]
51-
#[derive(Serialize, Default)]
51+
#[derive(Serialize, Default, Clone)]
5252
struct BulkMetadata {
5353
_index: Option<String>,
5454
// TODO: intentionally omit type for now, as it's going away.
@@ -68,6 +68,7 @@ struct BulkMetadata {
6868
///
6969
/// The header contains the bulk action and the specific action metadata
7070
/// such as the id of the source document, index, etc.
71+
#[derive(Clone)]
7172
struct BulkHeader {
7273
action: BulkAction,
7374
metadata: BulkMetadata,
@@ -152,6 +153,7 @@ impl Serialize for BulkHeader {
152153
/// # Ok(())
153154
/// # }
154155
/// ```
156+
#[derive(Clone)]
155157
pub struct BulkOperation<B> {
156158
header: BulkHeader,
157159
source: Option<B>,

0 commit comments

Comments
 (0)