Skip to content

Commit

Permalink
Rename payload2 to payload
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Apr 30, 2020
1 parent 7cff876 commit 9d0298d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion components/datap_json/src/lib.rs
Expand Up @@ -41,7 +41,7 @@ impl datap::DataProvider for JsonDataProvider {
// TODO: Use the request variable
Ok(datap::Response {
locale: "root".to_string(),
payload2: Cow::Owned(self.data.decimal.symbols_v1_a.clone_into_box())
payload: Cow::Owned(self.data.decimal.symbols_v1_a.clone_into_box())
})
}
}
4 changes: 2 additions & 2 deletions components/util/src/datap/mod.rs
Expand Up @@ -52,12 +52,12 @@ impl ToOwned for dyn Bovine {
pub struct Response {
// TODO: Make this a Locale instead of a String
pub locale: String,
pub payload2: Cow<'static, dyn Bovine>,
pub payload: Cow<'static, dyn Bovine>,
}

impl Response {
pub fn unwrap_payload<T: 'static>(&self) -> &T {
Any::downcast_ref::<T>(self.payload2.as_any()).unwrap()
Any::downcast_ref::<T>(self.payload.as_any()).unwrap()
}
}

Expand Down

0 comments on commit 9d0298d

Please sign in to comment.