Skip to content

Commit

Permalink
Use correct ErrorCode enum
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Dec 5, 2024
1 parent 683c858 commit 375d0b6
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions crates/storage/src/lazy/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ use ink_storage_traits::{
StorableHint,
StorageKey,
};
#[cfg(not(feature = "revive"))]
use pallet_contracts_uapi::ReturnErrorCode;
#[cfg(feature = "revive")]
use pallet_revive_uapi::ReturnErrorCode;
use scale::EncodeLike;

use crate::{
Expand Down Expand Up @@ -415,7 +411,7 @@ where
T: Storable + EncodeLike<V>,
{
if index >= self.len() {
return Err(ReturnErrorCode::KeyNotFound.into());
return Err(ink_env::ReturnErrorCode::KeyNotFound.into());
}

self.elements.try_insert(index, value)
Expand Down

0 comments on commit 375d0b6

Please sign in to comment.