Put GetWeight where it belongs (#1212)

* Put `GetWeight` where it belongs

* add GetWeight to v2

* Re-export unchanged trait

---------

Co-authored-by: Just van Stam <just.van.stam@gmail.com>
Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
This commit is contained in:
Gavin Wood
2023-08-31 07:16:57 +01:00
committed by GitHub
parent 36b4f2583e
commit 109287f4ca
5 changed files with 12 additions and 12 deletions
+5
View File
@@ -23,6 +23,11 @@ use scale_info::TypeInfo;
use super::*;
// A simple trait to get the weight of some object.
pub trait GetWeight<W> {
fn weight(&self) -> sp_weights::Weight;
}
#[derive(Copy, Clone, Encode, Decode, Eq, PartialEq, Debug, TypeInfo)]
pub enum Error {
// Errors that happen due to instructions being executed. These alone are defined in the