Closed alexb231 closed 3 months ago
Looks good. I am just wondering, if a get_available(&self, task_type: TaskType) -> Option<&Task>
(any
-> find
) function would be more useful? You could still call is_some()
to get the same result, or match on the result, to have immediate access to the Task in theSome(_)
path to see, how much of it you are still missing.
But if you do not need that info and would like just the bool function, I can just merge this, if you want?
That is an interesting approach as well, for my personal use case the bool works just fine but i could implement a get available. But you are absolutely right .. i didnt think of that. There is no need to merge it, if its not useful since its your personal project :D i just personally like small helper functions.
Thanks!
There is no need to merge it, if its not useful since its your personal project :D i just personally like small helper functions.
Yes, I agree, small helper functions are great for usability, but I have sadly not gotten around to writing a lot of them. They are mainly just in the parts of this api that I actually use myself, so I always greatly appreciate any kind of help in improving the parts that I have neglected a bit 😄
Thanks!
There is no need to merge it, if its not useful since its your personal project :D i just personally like small helper functions.
Yes, I agree, small helper functions are great for usability, but I have sadly not gotten around to writing a lot of them. They are mainly just in the parts of this api that I actually use myself, so I always greatly appreciate any kind of help in improving the parts that I have neglected a bit 😄
Well you did all the heavy lifting so I understand that it had priority. Thanks for the feedback I'm just learning rust, so telling me your thoughts is actually very valuable.
Can be useful when only wanting to check for a specific task that might be required for the day that might not be done after doing the daily routines e.g playing against the gambler or attacks without a weapon, then theres no need to filter the tasks Vec. Also formatting and clippy.