odradev / odra

Odra framework
MIT License
62 stars 2 forks source link

`ContractRef` and `HostRef` entrypoint inliners #490

Open zie1ony opened 4 months ago

zie1ony commented 4 months ago

Consider simplifying this code:

impl NameTokenContractRef {
    pub fn metadata_by_hash(&self, token_hash: String) -> String {
        self.metadata(Maybe::None, Maybe::Some(token_hash))
    }
}

#[cfg(not(target_arch = "wasm32"))]
impl NameTokenHostRef {
    pub fn metadata_by_hash(&self, token_hash: String) -> String {
        self.metadata(Maybe::None, Maybe::Some(token_hash))
    }
}