Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

Commit 3e841bd

Browse files
author
Raphael Santo Domingo
committed
Rename 'type' to 'product_type' for coherency
Signed-off-by: Raphael Santo Domingo <[email protected]>
1 parent c214cbc commit 3e841bd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sdk/protos/product_state.proto

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ message Product {
2626
string identifier = 1;
2727

2828
// What type of product is this (GS1)
29-
ProductType type = 2;
29+
ProductType product_type = 2;
3030

3131
// Who owns this product (pike organization id)
3232
string owner = 3;

sdk/src/protocol/product/state.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ impl FromProto<protos::product_state::Product> for Product {
8888
fn from_proto(product: protos::product_state::Product) -> Result<Self, ProtoConversionError> {
8989
Ok(Product {
9090
identifier: product.get_identifier().to_string(),
91-
product_type: ProductType::from_proto(product.get_field_type())?,
91+
product_type: ProductType::from_proto(product.get_product_type())?,
9292
owner: product.get_owner().to_string(),
9393
product_values: product
9494
.get_product_values()
@@ -104,7 +104,7 @@ impl FromNative<Product> for protos::product_state::Product {
104104
fn from_native(product: Product) -> Result<Self, ProtoConversionError> {
105105
let mut proto = protos::product_state::Product::new();
106106
proto.set_identifier(product.identifier().to_string());
107-
proto.set_field_type(product.product_type().clone().into_proto()?);
107+
proto.set_product_type(product.product_type().clone().into_proto()?);
108108
proto.set_owner(product.owner().to_string());
109109
proto.set_product_values(RepeatedField::from_vec(
110110
product

0 commit comments

Comments
 (0)