From 36832ad2f25c5be56808dfaec6f734e495805093 Mon Sep 17 00:00:00 2001 From: Vasilis Kalos Date: Sun, 30 Jun 2024 19:32:56 +0300 Subject: [PATCH] refactor: add key conversion utils --- .github/workflows/ci-wrapper-wasm.yml | 4 ++-- src/common/util.rs | 1 + src/error.rs | 2 -- wrappers/wasm/scripts/build-package.sh | 2 -- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-wrapper-wasm.yml b/.github/workflows/ci-wrapper-wasm.yml index e319dc1d..97ff774d 100644 --- a/.github/workflows/ci-wrapper-wasm.yml +++ b/.github/workflows/ci-wrapper-wasm.yml @@ -32,8 +32,8 @@ jobs: toolchain: stable override: true - - name: Install llvm - run: which clang + - name: Export Clang + run: export CC=/usr/bin/clang - name: Run yarn install run: yarn install --frozen-lockfile diff --git a/src/common/util.rs b/src/common/util.rs index c97aaa71..3e3ed93a 100644 --- a/src/common/util.rs +++ b/src/common/util.rs @@ -14,6 +14,7 @@ macro_rules! print_byte_array { pub(crate) use print_byte_array; +/// Convert a vec to a byte array pub fn vec_to_byte_array(vec: &[u8]) -> Result<[u8; N], Error> { let data_len = vec.len(); match <[u8; N]>::try_from(vec.to_owned()) { diff --git a/src/error.rs b/src/error.rs index 95f33723..a461315b 100644 --- a/src/error.rs +++ b/src/error.rs @@ -1,5 +1,3 @@ -use std::usize; - /// Error enumerates all possible errors occuring in this library. /// An error returned by the crypto component. #[derive(Clone, PartialEq, Eq, Hash)] diff --git a/wrappers/wasm/scripts/build-package.sh b/wrappers/wasm/scripts/build-package.sh index 8d1cc819..d1cea014 100755 --- a/wrappers/wasm/scripts/build-package.sh +++ b/wrappers/wasm/scripts/build-package.sh @@ -8,8 +8,6 @@ SRC_WASM=lib/web/index.js # Add dev dependencies to current path export PATH="$PATH:node_modules/.bin" -export CC=/usr/bin/clang -echo $PATH if [ -z "$BUILD_MODE" ] then