mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 02:57:57 +00:00
Rename from_components to from_parts (#12473)
* Rename `from_components` to `from_parts` * Fixes * Spelling
This commit is contained in:
@@ -112,8 +112,8 @@ impl Weight {
|
||||
Self { ref_time: 0, proof_size }
|
||||
}
|
||||
|
||||
/// Construct [`Weight`] with weight components, namely reference time and storage size weights.
|
||||
pub const fn from_components(ref_time: u64, proof_size: u64) -> Self {
|
||||
/// Construct [`Weight`] from weight parts, namely reference time and proof size weights.
|
||||
pub const fn from_parts(ref_time: u64, proof_size: u64) -> Self {
|
||||
Self { ref_time, proof_size }
|
||||
}
|
||||
|
||||
@@ -455,8 +455,8 @@ mod tests {
|
||||
#[test]
|
||||
fn is_zero_works() {
|
||||
assert!(Weight::zero().is_zero());
|
||||
assert!(!Weight::from_components(1, 0).is_zero());
|
||||
assert!(!Weight::from_components(0, 1).is_zero());
|
||||
assert!(!Weight::from_parts(1, 0).is_zero());
|
||||
assert!(!Weight::from_parts(0, 1).is_zero());
|
||||
assert!(!Weight::MAX.is_zero());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user