impl Deref for OptionsLimit
@@ -4,6 +4,7 @@ use either::Either;
use semver::Version;
use serde::{Deserialize, Serialize};
use std::borrow::Cow;
+use std::ops::Deref;
#[derive(Clone, PartialEq, Serialize, Deserialize)]
#[cfg_attr(test, derive(Derivative, Debug))]
@@ -151,6 +152,13 @@ impl Default for OptionsLimit {
}
}
+impl Deref for OptionsLimit {
+ type Target = usize;
+ fn deref(&self) -> &Self::Target {
+ &self.0
+ }
+}
+
#[derive(Default, Clone, PartialEq, Serialize, Deserialize)]
#[cfg_attr(test, derive(Debug))]
#[serde(rename_all = "camelCase")]
