fix(ci): add missing const fn (#8822)

This commit is contained in:
joshieDo
2024-06-14 12:07:39 +02:00
committed by GitHub
parent bc15e6c03a
commit fc770423b3
34 changed files with 40 additions and 40 deletions

View File

@ -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 {

View File

@ -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 }
}