Skip to content

Commit

Permalink
chore(wasm-interface-common): import Range from core
Browse files Browse the repository at this point in the history
  • Loading branch information
clearloop committed Dec 22, 2023
1 parent dfcaaa5 commit bca467b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions primitives/wasm-interface-common/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

use core::ops::Range;

/// Construct a range from an offset to a data length after the offset.
/// Returns None if the end of the range would exceed some maximum offset.
pub fn checked_range(offset: usize, len: usize, max: usize) -> Option<Range<usize>> {
Expand Down
1 change: 0 additions & 1 deletion primitives/wasm-interface/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

use super::*;
use wasmtime::{AsContext, AsContextMut};
use sp_std::ops::Range;
pub use sp_wasm_interface_common::util::checked_range;

pub fn write_memory_from(
Expand Down

0 comments on commit bca467b

Please sign in to comment.