diff --git a/master/print.html b/master/print.html index 7bda1d5a94..953b1dd16a 100644 --- a/master/print.html +++ b/master/print.html @@ -2802,18 +2802,18 @@
Your Rust code would look like this:
- // simple struct with a single generic param
- let arg1 = SimpleGeneric {
- single_generic_param: 123u64,
- };
-
- let result = contract_methods
- .struct_w_generic(arg1.clone())
- .call()
- .await?
- .value;
-
- assert_eq!(result, arg1);
+ // simple struct with a single generic param
+ let arg1 = SimpleGeneric {
+ single_generic_param: 123u64,
+ };
+
+ let result = contract_methods
+ .struct_w_generic(arg1.clone())
+ .call()
+ .await?
+ .value;
+
+ assert_eq!(result, arg1);
Unused generic type parameters
Sway supports unused generic type parameters when declaring structs/enums:
diff --git a/master/types/custom_types.html b/master/types/custom_types.html
index 3e0bfd68cb..90209bd860 100644
--- a/master/types/custom_types.html
+++ b/master/types/custom_types.html
@@ -188,18 +188,18 @@ Generics
}
Your Rust code would look like this:
- // simple struct with a single generic param
- let arg1 = SimpleGeneric {
- single_generic_param: 123u64,
- };
-
- let result = contract_methods
- .struct_w_generic(arg1.clone())
- .call()
- .await?
- .value;
-
- assert_eq!(result, arg1);
+ // simple struct with a single generic param
+ let arg1 = SimpleGeneric {
+ single_generic_param: 123u64,
+ };
+
+ let result = contract_methods
+ .struct_w_generic(arg1.clone())
+ .call()
+ .await?
+ .value;
+
+ assert_eq!(result, arg1);
Unused generic type parameters
Sway supports unused generic type parameters when declaring structs/enums: