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
//! This library is a work in progress. PRs are very welcome! Currently implemented algorithms include:
6
8
//!
@@ -21,8 +23,8 @@
21
23
//!
22
24
//! As these implementations are often in hot code paths, unsafe is used, albeit only when necessary to a) achieve the asymptotically optimal algorithm or b) mitigate an observed bottleneck.
/// For the result of a `std::iter::sum()` when an additive identity (i.e. zero) can't be constructed (in the case where we're summing an empty iterator).
156
-
#[derive(Copy,Clone,Debug)]
156
+
#[derive(Copy,Clone,Serialize,Deserialize,Debug)]
157
157
pubenumZeroable<T>{
158
158
/// Zero
159
159
Zero,
160
160
/// Nonzero
161
161
Nonzero(T),
162
162
}
163
+
#[allow(clippy::missing_errors_doc)]
163
164
impl<T>Zeroable<T>{
164
165
/// Transform to a `Result<T, E>`.
165
166
pubfnok_or<E>(self,err:E) -> Result<T,E>{
@@ -184,25 +185,6 @@ impl<T> From<Option<T>> for Zeroable<T> {
0 commit comments