Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/subspace-farmer/src/farm/plotted_pieces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ where
pub fn read_piece(
&self,
piece_index: PieceIndex,
) -> Option<impl Future<Output = Option<Piece>> + 'static> {
) -> Option<impl Future<Output = Option<Piece>> + use<FarmIndex>> {
Copy link
Member

@teor2345 teor2345 May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the use<FarmIndex> is only required for debugging, so it can be removed by doing:

let farm_index = usize::from(piece_details.farm_index);

near the start of the function.

This change doesn't need to be in this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automatically performed (but the 'static needs to be manually removed):

cargo fix --broken-code

let piece_details = match self.pieces.get(&piece_index) {
Some(piece_details) => piece_details
.choose(&mut thread_rng())
Expand Down
3 changes: 2 additions & 1 deletion crates/subspace-farmer/src/single_disk_farm/farming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ where
) -> Result<
Vec<(
SectorIndex,
impl ProvableSolutions<Item = Result<Solution<PublicKey>, ProvingError>> + 'a,
impl ProvableSolutions<Item = Result<Solution<PublicKey>, ProvingError>>
+ use<'a, PosTable, Plot>,
Comment on lines -137 to +138
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested by:

cargo fix --broken-code

)>,
AuditingError,
>
Expand Down