mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(ci): add missing const fn (#8822)
This commit is contained in:
@ -36,7 +36,7 @@ pub struct Cursor<K: TransactionKind, T: Table> {
|
||||
}
|
||||
|
||||
impl<K: TransactionKind, T: Table> Cursor<K, T> {
|
||||
pub(crate) fn new_with_metrics(
|
||||
pub(crate) const fn new_with_metrics(
|
||||
inner: reth_libmdbx::Cursor<K>,
|
||||
metrics: Option<Arc<DatabaseEnvMetrics>>,
|
||||
) -> Self {
|
||||
|
||||
@ -53,7 +53,7 @@ impl<K: Key> RawKey<K> {
|
||||
|
||||
/// Creates a raw key from an existing `Vec`. Useful when we already have the encoded
|
||||
/// key.
|
||||
pub fn from_vec(vec: Vec<u8>) -> Self {
|
||||
pub const fn from_vec(vec: Vec<u8>) -> Self {
|
||||
Self { key: vec, _phantom: std::marker::PhantomData }
|
||||
}
|
||||
|
||||
@ -118,7 +118,7 @@ impl<V: Value> RawValue<V> {
|
||||
|
||||
/// Creates a raw value from an existing `Vec`. Useful when we already have the encoded
|
||||
/// value.
|
||||
pub fn from_vec(vec: Vec<u8>) -> Self {
|
||||
pub const fn from_vec(vec: Vec<u8>) -> Self {
|
||||
Self { value: vec, _phantom: std::marker::PhantomData }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user