Skip to content

Commit

Permalink
Remove link from metadata update
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Pietrek <tomasz@nats.io>
  • Loading branch information
Jarema committed Aug 1, 2023
1 parent 932aa8b commit b5baf2c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
7 changes: 1 addition & 6 deletions async-nats/src/jetstream/object_store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl ObjectStore {
let object_info = ObjectInfo {
name: object_meta.name,
description: object_meta.description,
link: object_meta.link,
link: None,
bucket: self.name.clone(),
nuid: object_nuid,
chunks: object_chunks,
Expand Down Expand Up @@ -505,7 +505,6 @@ impl ObjectStore {
/// object_store::ObjectMeta {
/// name: "new_name".to_string(),
/// description: Some("a new description".to_string()),
/// link: None,
/// },
/// )
/// .await?;
Expand Down Expand Up @@ -564,7 +563,6 @@ impl ObjectStore {

info.name = metadata.name;
info.description = metadata.description;
info.link = metadata.link;

let name = encode_object_name(&info.name);
let subject = format!("$O.{}.M.{}", &self.name, &name);
Expand Down Expand Up @@ -850,8 +848,6 @@ pub struct ObjectMeta {
pub name: String,
/// A short human readable description of the object.
pub description: Option<String>,
/// Link this object points to, if any.
pub link: Option<ObjectLink>,
}

impl From<&str> for ObjectMeta {
Expand All @@ -868,7 +864,6 @@ impl From<ObjectInfo> for ObjectMeta {
ObjectMeta {
name: info.name,
description: info.description,
link: info.link,
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions async-nats/tests/object_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ mod object_store {
ObjectMeta {
name: "Foo".to_string(),
description: Some("foo desc".to_string()),
..Default::default()
},
&mut "dadada".as_bytes(),
)
Expand Down Expand Up @@ -366,7 +365,6 @@ mod object_store {
let given_metadata = ObjectMeta {
name: "new_object".to_owned(),
description: Some("description".to_string()),
link: None,
};

bucket
Expand Down Expand Up @@ -398,6 +396,5 @@ mod object_store {

assert_eq!(info.name, given_metadata.name);
assert_eq!(info.description, given_metadata.description);
assert_eq!(info.link, given_metadata.link);
}
}

0 comments on commit b5baf2c

Please sign in to comment.