Skip to content

Commit

Permalink
Derive Clone on Bulk request structs (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
jefftt authored Aug 21, 2024
1 parent 0c92c3a commit bcc4c0f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion elasticsearch/src/root/bulk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ enum BulkAction {
///
/// the specific bulk action metadata such as the id of the source document, index, etc.
#[serde_with::skip_serializing_none]
#[derive(Serialize, Default)]
#[derive(Serialize, Default, Clone)]
struct BulkMetadata {
_index: Option<String>,
// TODO: intentionally omit type for now, as it's going away.
Expand All @@ -68,6 +68,7 @@ struct BulkMetadata {
///
/// The header contains the bulk action and the specific action metadata
/// such as the id of the source document, index, etc.
#[derive(Clone)]
struct BulkHeader {
action: BulkAction,
metadata: BulkMetadata,
Expand Down Expand Up @@ -152,6 +153,7 @@ impl Serialize for BulkHeader {
/// # Ok(())
/// # }
/// ```
#[derive(Clone)]
pub struct BulkOperation<B> {
header: BulkHeader,
source: Option<B>,
Expand Down

0 comments on commit bcc4c0f

Please sign in to comment.