-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flesh out functionality #18
Comments
Hmmmm so something I'd like to discuss is the functions that come "Methods from Deref<Target = [T]>". Is this something that's possible with Otherwise, I think the way to go about it is go through the list of functions and see if they're possible to implement. |
As discussed async, we should use https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html for things that take a length, e.g. |
Something I'd also be interested in is |
In the checklist it says |
I think it's checked for the same reason |
We should flesh out the functionality of
nonempty
. A lot of it would just be theVec
implementation.Enumerating these for clarity and also to comment on which ones we may not want:
append
N/A (memory is not contiguous)as_mut_ptr
N/Aas_mut_slice
N/Aas_ptr
N/Aas_slice
capacity
chunks
chunks_exact
chunks_exact_mut
chunks_mut
clone_from_slice
-we useThis doesn't make sense either since it's just copying a slice's contents in, but we can't guarantee a length of 1 without panicing.from_slice
, we should renameconcat
connect
contains
copy_from_slice
-we haveLooking into the semantics of this, I think it doesn't suitfrom_slice
but aCopy
version would be goodNonEmpty
after all.copy_within
clear
- we probably don't want thisdedup
dedup_by
drain
- wouldn't make sense forNonEmpty
unless it returned aVec
rather thanDrain
drain_filter
- same as aboveends_with
eq_ignore_ascii_case
extend_from_slice
first
first_mut
from_raw_parts
- this seems unecessaryget
get_mut
get_unchecked
get_unchecked_mut
insert
into_boxed_slice
into_raw_parts
- not sure about this oneis_ascii
is_empty
is_sorted
is_sorted_by_key
iter
iter_mut
join
last
last_mut
leak
- seems specialisedlen
make_ascii_lowercase
make_ascii_uppercase
new
partition_at_index
partition_at_index_by
partition_at_index_by_key
partition_deup
partition_deup_by
partition_deup_by_key
pop
push
rchunks
rchunks_exact
rchunks_exact_mut
rchunks_mut
remove
- should give backVec
remove_item
- should give backVec
repeat
reserve
reserve_exact
resize
- possibly just work on the tailVec
resize_default
resize_wtih
retain
- unsure if this should be keptreverse
rotate_left
rotate_right
rsplit
rsplit_mut
rsplitn
rsplitn_mut
set_len
shrink_to
- should be greater than 1shrink_to_fit
sort
sort_by
sort_by_cahced_key
sort_by_key
sort_unstable
sort_unstable_by
sort_unstable_by_key
splice
split
split_at
split_at_mut
split_first
split_first_mut
split_last
split_last
split_last_mut
split_mut
split_off
splitn
splitn_mut
starts_with
swap
swap_with_slice
to_ascii_lowercase
to_ascii_uppercase
to_vec
- theInto
impl does thistry_reserve
try_reserve_exact
windows
with_capacity
From<NonEmpty<T>> for Vec<T>
- Implement and test IntoIterator #17 (comment)The text was updated successfully, but these errors were encountered: