Reapply the old `GetSlice` as `OptionSlice`, because sometimes it's needed to use `Option<usize>` parameters
Created by: stratact
This is the return of the old GetSlice
, now known as OptionSlice
, because when times your just returning an Option<usize>
, say from using .get()
or .find()
method slices, you should have the work done for you and done correctly without you having to think about it. So here are the following changes:
- Adds
OptionSlice
which takesOption<usize>
as parameters - Moves both
GetSlice
andOptionSlice
to aslice
module- And publicly exports them there
- Fix the imports for other files
- Use
OptionSlice
in the more appropriate places whereGetSlice
is not well suited.