Rename traits to remove T suffix (#1535)

* Rename traits to renmove T suffix

* Fix doc links

* Fix straggler doc links
This commit is contained in:
James Wilson
2024-04-16 16:35:14 +01:00
committed by GitHub
parent 1e111ea9db
commit ac606cf625
32 changed files with 2426 additions and 2229 deletions
+3 -3
View File
@@ -4,7 +4,7 @@
use crate::{client::OfflineClientT, error::Error, Config};
use derive_where::derive_where;
use subxt_core::constants::address::AddressT;
use subxt_core::constants::address::Address;
/// A client for accessing constants.
#[derive_where(Clone; Client)]
@@ -28,7 +28,7 @@ impl<T: Config, Client: OfflineClientT<T>> ConstantsClient<T, Client> {
/// if the address is valid (or if it's not possible to check since the address has no validation hash).
/// Return an error if the address was not valid or something went wrong trying to validate it (ie
/// the pallet or constant in question do not exist at all).
pub fn validate<Address: AddressT>(&self, address: &Address) -> Result<(), Error> {
pub fn validate<Addr: Address>(&self, address: &Addr) -> Result<(), Error> {
let metadata = self.client.metadata();
subxt_core::constants::validate(address, &metadata).map_err(Error::from)
}
@@ -36,7 +36,7 @@ impl<T: Config, Client: OfflineClientT<T>> ConstantsClient<T, Client> {
/// Access the constant at the address given, returning the type defined by this address.
/// This is probably used with addresses given from static codegen, although you can manually
/// construct your own, too.
pub fn at<Address: AddressT>(&self, address: &Address) -> Result<Address::Target, Error> {
pub fn at<Addr: Address>(&self, address: &Addr) -> Result<Addr::Target, Error> {
let metadata = self.client.metadata();
subxt_core::constants::get(address, &metadata).map_err(Error::from)
}