You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A big portion of the alloc crate uses cfg attributes to check whether global oom handling is enabled (see this example).
Right now the crate doesn't even compile when passing --cfg=no_global_oom_handling to rustc, so it would be nice if this crate also checked it.
It would also be nice if the existing API got extended to allow manually managing oom errors (for example, making a RawTable::try_insert which would call try_reserve instead of reserve, and so on with HashTable::insert_unique and the rest of the public API).
Impl
In a private fork of this repo I've easily managed to compile the crate without the std by cfg-ing crate::raw::Fallibility and every function / impl Trait that depended on it.
However, it is clear that the crate was not designed with the possibility of a global oom handler not existing, since there are no methods like try_insert or try_clone (which is itself a debate on it's own, since there is no TryClone trait in the std/core)
The text was updated successfully, but these errors were encountered:
Issue
A big portion of the
alloc
crate usescfg
attributes to check whether global oom handling is enabled (see this example).Right now the crate doesn't even compile when passing
--cfg=no_global_oom_handling
to rustc, so it would be nice if this crate also checked it.It would also be nice if the existing API got extended to allow manually managing oom errors (for example, making a
RawTable::try_insert
which would calltry_reserve
instead ofreserve
, and so on withHashTable::insert_unique
and the rest of the public API).Impl
In a private fork of this repo I've easily managed to compile the crate without the std by cfg-ing
crate::raw::Fallibility
and every function / impl Trait that depended on it.However, it is clear that the crate was not designed with the possibility of a global oom handler not existing, since there are no methods like
try_insert
ortry_clone
(which is itself a debate on it's own, since there is no TryClone trait in the std/core)The text was updated successfully, but these errors were encountered: