Skip to content

Commit

Permalink
add comments to explain why subdata must be static lifetime
Browse files Browse the repository at this point in the history
Signed-off-by: remzi <[email protected]>
  • Loading branch information
HaoYang670 committed Nov 21, 2023
1 parent e68f463 commit e2f6d04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rucat-cluster/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub struct Task<Data, SubData, SubResult, Result> {

impl<Data, SubData, SubResult, Result> Task<Data, SubData, SubResult, Result>
where
SubData: SubDataTrait + 'static,
SubData: SubDataTrait + 'static, // the lifetime must be static because it is serializable (I tried to use 'a but failed)
SubResult: SubResultTrait,
{
pub fn new(
Expand Down

0 comments on commit e2f6d04

Please sign in to comment.