Balanced task distribution to shards #236
Annotations
10 errors
pallets/tasks/src/lib.rs#L1318
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1318:62
|
1318 | let mut tasks_per_shard = (assigned_tasks.saturating_add(unassigned_tasks))
| -------------- ^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1318 | let mut tasks_per_shard = (assigned_tasks.saturating_add(unassigned_tasks.try_into().unwrap()))
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1318
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1318:62
|
1318 | let mut tasks_per_shard = (assigned_tasks.saturating_add(unassigned_tasks))
| -------------- ^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1318 | let mut tasks_per_shard = (assigned_tasks.saturating_add(unassigned_tasks.try_into().unwrap()))
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1319
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1319:22
|
1319 | .saturating_div(network_shards.count());
| -------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1319 | .saturating_div(network_shards.count().try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1319
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1319:22
|
1319 | .saturating_div(network_shards.count());
| -------------- ^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1319 | .saturating_div(network_shards.count().try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1322
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1322:57
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks);
| ---------------- ^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this function are incorrect
|
help: the return type of this call is `usize` due to the type of the argument passed
--> pallets/tasks/src/lib.rs:1322:23
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------^
| |
| this argument influences the return type of `sp_std`
note: function defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:1264:8
|
1264 | pub fn min<T: Ord>(v1: T, v2: T) -> T {
| ^^^
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks.try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1322
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1322:57
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks);
| ---------------- ^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this function are incorrect
|
help: the return type of this call is `usize` due to the type of the argument passed
--> pallets/tasks/src/lib.rs:1322:23
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^--------------------^
| |
| this argument influences the return type of `sp_std`
note: function defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/cmp.rs:1264:8
|
1264 | pub fn min<T: Ord>(v1: T, v2: T) -> T {
| ^^^
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1322 | tasks_per_shard = sp_std::cmp::min(tasks_per_shard, max_assignable_tasks.try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1330
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1330:52
|
1330 | let capacity = tasks_per_shard.saturating_sub(shard_capacity);
| -------------- ^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1330 | let capacity = tasks_per_shard.saturating_sub(shard_capacity.try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1330
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1330:52
|
1330 | let capacity = tasks_per_shard.saturating_sub(shard_capacity);
| -------------- ^^^^^^^^^^^^^^ expected `u32`, found `usize`
| |
| arguments to this method are incorrect
|
note: method defined here
--> /home/runner-2/.rustup/toolchains/1.79.0-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/num/mod.rs:1145:5
|
1145 | / uint_impl! {
1146 | | Self = u32,
1147 | | ActualT = u32,
1148 | | SignedT = i32,
... |
1162 | | bound_condition = "",
1163 | | }
| |_____^
= note: this error originates in the macro `uint_impl` (in Nightly builds, run with -Z macro-backtrace for more info)
help: you can convert a `usize` to a `u32` and panic if the converted value doesn't fit
|
1330 | let capacity = tasks_per_shard.saturating_sub(shard_capacity.try_into().unwrap());
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1332
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1332:72
|
1332 | weight.saturating_add(Self::schedule_tasks_shard(network, shard, capacity));
| -------------------------- ^^^^^^^^ expected `usize`, found `u32`
| |
| arguments to this function are incorrect
|
note: associated function defined here
--> pallets/tasks/src/lib.rs:1350:6
|
1350 | fn schedule_tasks_shard(network: NetworkId, shard_id: ShardId, capacity: usize) -> Weight {
| ^^^^^^^^^^^^^^^^^^^^ ---------------
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
|
1332 | weight.saturating_add(Self::schedule_tasks_shard(network, shard, capacity.try_into().unwrap()));
| ++++++++++++++++++++
|
pallets/tasks/src/lib.rs#L1332
error[E0308]: mismatched types
--> pallets/tasks/src/lib.rs:1332:72
|
1332 | weight.saturating_add(Self::schedule_tasks_shard(network, shard, capacity));
| -------------------------- ^^^^^^^^ expected `usize`, found `u32`
| |
| arguments to this function are incorrect
|
note: associated function defined here
--> pallets/tasks/src/lib.rs:1350:6
|
1350 | fn schedule_tasks_shard(network: NetworkId, shard_id: ShardId, capacity: usize) -> Weight {
| ^^^^^^^^^^^^^^^^^^^^ ---------------
help: you can convert a `u32` to a `usize` and panic if the converted value doesn't fit
|
1332 | weight.saturating_add(Self::schedule_tasks_shard(network, shard, capacity.try_into().unwrap()));
| ++++++++++++++++++++
|
The logs for this run have expired and are no longer available.
Loading