emerentius / ord_subset Goto Github PK
View Code? Open in Web Editor NEWTools for working with types where a subset of values has a total order, like e.g. floats without NaN
License: Apache License 2.0
Tools for working with types where a subset of values has a total order, like e.g. floats without NaN
License: Apache License 2.0
I see that last tarball on crates.io has all files with executable bit which creates some problems when packaging for Fedora.
I would appreciate if you would release new version where tarball would not have those files with exec perms. Thanks in advance!
This will enable PartialEq and PartialOrd types to be used as hash keys if they provide Hash.
I'm missing this, it would also be nice to have it to implement it to have a complete ord_subset
mirror of the slice API
In the documentation for ord_subset::OrdVar::new_unchecked it says:
Constructs an OrdVar without validity check. Incorrectly constructed OrdVars may panic during comparisons. This is the only way to construct an OrdVar out of a type that is not OrdSubset.
And it is marked unsafe. It is currently unclear what the unsafe behavior is here. panic
ing is not unsafe, so if comparisons either succeed or panic then probably nothing should be marked unsafe in this crate. If comparisons (or other functionality) can do something other than succeed or panic, then that behavior should be noted in the documentation along with info on how to ensure correct behavior when using the unsafe features.
On recent nightlies, OrdSubsetSliceExt
triggers the where_clauses_object_safety
warning:
warning: the trait `slice_ext::OrdSubsetSliceExt` cannot be made into an object
--> src/slice_ext.rs:42:5
|
42 | / fn ord_subset_sort(&mut self)
43 | | where
44 | | Self: AsMut<[T]>,
45 | | T: OrdSubset;
| |_____________________^
|
= note: #[warn(where_clauses_object_safety)] on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #51443 <https://github.com/rust-lang/rust/issues/51443>
= note: method `ord_subset_sort` references the `Self` type in where clauses
(+3 other similar warnings)
$ rustc --version
rustc 1.29.0-nightly (6a1c0637c 2018-07-23)
I don't have time right now, but I'll try to come back to this in a week or so.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.