refactor!: from compact_strains feat to raw_strains
This commit is contained in:
+6
-6
@@ -117,12 +117,12 @@
|
||||
//!
|
||||
//! ## Features
|
||||
//!
|
||||
//! | Flag | Description | Dependencies
|
||||
//! | ----------------- | ------------------------------------- | ------------
|
||||
//! | `default` | Enables the `compact_strains` feature |
|
||||
//! | `compact_strains` | Storing internal strain values in a plain Vec introduces an out-of-memory risk on maliciously long maps (see [/b/3739922](https://osu.ppy.sh/b/3739922)). This feature stores strains more compactly, but comes with a ~5% loss in performance. |
|
||||
//! | `sync` | Some gradual calculation types can only be shared across threads if this feature is enabled. This adds a performance penalty so only enable this if really needed. |
|
||||
//! | `tracing` | Any error encountered during beatmap decoding will be logged through `tracing::error`. If this feature is **not** enabled, errors will be ignored. | [`tracing`]
|
||||
//! | Flag | Description | Dependencies
|
||||
//! | ------------- | ------------------- | ------------
|
||||
//! | `default` | No features enabled |
|
||||
//! | `raw_strains` | With this feature, internal strain values will be stored in a plain `Vec`. This introduces an out-of-memory risk on maliciously long maps (see [/b/3739922](https://osu.ppy.sh/b/3739922)), but comes with a ~5% gain in performance. |
|
||||
//! | `sync` | Some gradual calculation types can only be shared across threads if this feature is enabled. This feature adds a small performance penalty. |
|
||||
//! | `tracing` | Any error encountered during beatmap decoding will be logged through `tracing::error`. If this feature is **not** enabled, errors will be ignored. | [`tracing`]
|
||||
//!
|
||||
//! ## Bindings
|
||||
//!
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
pub use inner::*;
|
||||
|
||||
#[cfg(feature = "compact_strains")]
|
||||
#[cfg(not(feature = "raw_strains"))]
|
||||
mod inner {
|
||||
use std::{iter::Copied, slice::Iter};
|
||||
|
||||
@@ -318,14 +318,14 @@ mod inner {
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "compact_strains"))]
|
||||
#[cfg(feature = "raw_strains")]
|
||||
mod inner {
|
||||
use std::{
|
||||
iter::Copied,
|
||||
slice::{Iter, IterMut},
|
||||
};
|
||||
|
||||
/// Plain wrapper around `Vec<f64>` because the `compact_strains` feature
|
||||
/// Plain wrapper around `Vec<f64>` because the `raw_strains` feature
|
||||
/// is disabled.
|
||||
#[derive(Clone)]
|
||||
pub struct StrainsVec {
|
||||
|
||||
Reference in New Issue
Block a user