Skip to content

Commit

Permalink
Merge pull request #2001 from demergent-labs/quick_clean_up
Browse files Browse the repository at this point in the history
Quick clean up
  • Loading branch information
lastmjs authored Aug 19, 2024
2 parents 826c656 + 045629c commit c7b4649
Show file tree
Hide file tree
Showing 79 changed files with 122 additions and 97 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified canister_templates/experimental.wasm
Binary file not shown.
Binary file modified canister_templates/stable.wasm
Binary file not shown.
4 changes: 3 additions & 1 deletion canisters/ledger/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
//
// Some documentation changed from original work.

import { IDL, Principal } from '../../';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';

import * as icrc from '../icrc';

// Amount of tokens, measured in 10^-8 of a token.
Expand Down
3 changes: 2 additions & 1 deletion canisters/management/canister_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
//
// Some documentation changed from original work.

import { IDL, Principal } from '../../';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';

/** Argument type of managementCanister.canister_info. */
export const CanisterInfoArgs = IDL.Record({
Expand Down
3 changes: 2 additions & 1 deletion canisters/management/canister_management.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IDL, Principal } from '../../';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';

export const CanisterId = IDL.Principal;
export type CanisterId = Principal;
Expand Down
3 changes: 2 additions & 1 deletion canisters/management/http_request.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IDL, Principal } from '../../';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';

export const HttpHeader = IDL.Record({
name: IDL.Text,
Expand Down
3 changes: 2 additions & 1 deletion canisters/management/t_ecdsa.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { IDL, Principal } from '../..';
import { IDL } from '@dfinity/candid';
import { Principal } from '@dfinity/principal';

export const EcdsaCurve = IDL.Variant({
secp256k1: IDL.Null
Expand Down
4 changes: 3 additions & 1 deletion experimental/canisters/icrc/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}

import { nat, Record, text } from '../../';
import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { nat } from '../../../src/lib/experimental/candid/types/primitive/nats/nat';
import { text } from '../../../src/lib/experimental/candid/types/primitive/text';

export const BadFee = Record({
expected_fee: nat
Expand Down
8 changes: 7 additions & 1 deletion experimental/canisters/icrc/icrc_2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}

import { blob, nat, nat64, Null, Opt, Record, Variant } from '../../';
import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { Variant } from '../../../src/lib/experimental/candid/types/constructed/variant';
import { nat } from '../../../src/lib/experimental/candid/types/primitive/nats/nat';
import { nat64 } from '../../../src/lib/experimental/candid/types/primitive/nats/nat64';
import { Null } from '../../../src/lib/experimental/candid/types/primitive/null';
import {
BadBurn,
BadFee,
Expand Down
3 changes: 2 additions & 1 deletion experimental/canisters/ledger/address/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}

import { Principal } from '@dfinity/principal';
import { getCrc32 } from '@dfinity/principal/lib/esm/utils/getCrc';
import { sha224 } from 'js-sha256';

import { blob, Principal } from '../../../';
import { blob } from '../../../../src/lib/experimental/candid/types/constructed/blob';
import { Address } from '../index';

// TODO we need to review these heavily
Expand Down
18 changes: 8 additions & 10 deletions experimental/canisters/management/canister_info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@ if (globalThis._azleExperimental !== true) {
//
// Some documentation changed from original work.

import {
nat8,
nat64,
Null,
Opt,
Principal,
Record,
Variant,
Vec
} from '../../';
import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { Variant } from '../../../src/lib/experimental/candid/types/constructed/variant';
import { Vec } from '../../../src/lib/experimental/candid/types/constructed/vec';
import { nat8 } from '../../../src/lib/experimental/candid/types/primitive/nats/nat8';
import { nat64 } from '../../../src/lib/experimental/candid/types/primitive/nats/nat64';
import { Null } from '../../../src/lib/experimental/candid/types/primitive/null';
import { Principal } from '../../../src/lib/experimental/candid/types/reference/principal';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import { managementCanister } from '.'; // Used for links in comments

Expand Down
7 changes: 6 additions & 1 deletion experimental/canisters/management/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ if (globalThis._azleExperimental !== true) {
//
// Some documentation changed from original work.

import { blob, Canister, Principal, update, Vec, Void } from '../../';
import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Vec } from '../../../src/lib/experimental/candid/types/constructed/vec';
import { Void } from '../../../src/lib/experimental/candid/types/primitive/void';
import { Principal } from '../../../src/lib/experimental/candid/types/reference/principal';
import { Canister } from '../../../src/lib/experimental/candid/types/reference/service';
import { update } from '../../../src/lib/experimental/canister_methods/methods/update';
import {
GetBalanceArgs,
GetCurrentFeePercentilesArgs,
Expand Down
9 changes: 8 additions & 1 deletion experimental/canisters/management/t_ecdsa.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ if (globalThis._azleExperimental !== true) {
throw new Error(experimentalMessage('azle/experimental'));
}

import { blob, Null, Opt, Principal, Record, text, Variant, Vec } from '../../';
import { blob } from '../../../src/lib/experimental/candid/types/constructed/blob';
import { Opt } from '../../../src/lib/experimental/candid/types/constructed/opt';
import { Record } from '../../../src/lib/experimental/candid/types/constructed/record';
import { Variant } from '../../../src/lib/experimental/candid/types/constructed/variant';
import { Vec } from '../../../src/lib/experimental/candid/types/constructed/vec';
import { Null } from '../../../src/lib/experimental/candid/types/primitive/null';
import { text } from '../../../src/lib/experimental/candid/types/primitive/text';
import { Principal } from '../../../src/lib/experimental/candid/types/reference/principal';

export const EcdsaCurve = Variant({
secp256k1: Null
Expand Down
2 changes: 1 addition & 1 deletion global_dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ wasi2ic version: wasi2ic v0.2.0 (https://github.com/wasm-forge/wasi2ic?rev=806c3

node version: v20.11.0

rustc version: rustc 1.76.0 (07dca489a 2024-02-04)
rustc version: rustc 1.80.1 (3f5fd8dd4 2024-08-06)
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CandidValues } from '../../candid_values_arb';
import { SimpleCandidDefinitionArb } from '../../simple_type_arbs/definition_arb';
import { SimpleCandidValuesArb } from '../../simple_type_arbs/values_arb';
import { numberToSrcLiteral } from '../../to_src_literal/number';
import { NumberArb } from './';
import { NumberArb } from '.';

export function Int16Arb(): fc.Arbitrary<CandidValueAndMeta<number>> {
return CandidValueAndMetaArbGenerator(Int16DefinitionArb(), Int16ValueArb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CandidValues } from '../../candid_values_arb';
import { SimpleCandidDefinitionArb } from '../../simple_type_arbs/definition_arb';
import { SimpleCandidValuesArb } from '../../simple_type_arbs/values_arb';
import { numberToSrcLiteral } from '../../to_src_literal/number';
import { NumberArb } from './';
import { NumberArb } from '.';

export function Int32Arb(): fc.Arbitrary<CandidValueAndMeta<number>> {
return CandidValueAndMetaArbGenerator(Int32DefinitionArb(), Int32ValueArb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CandidValues } from '../../candid_values_arb';
import { SimpleCandidDefinitionArb } from '../../simple_type_arbs/definition_arb';
import { SimpleCandidValuesArb } from '../../simple_type_arbs/values_arb';
import { numberToSrcLiteral } from '../../to_src_literal/number';
import { NumberArb } from './';
import { NumberArb } from '.';

export function Int8Arb(): fc.Arbitrary<CandidValueAndMeta<number>> {
return CandidValueAndMetaArbGenerator(Int8DefinitionArb(), Int8ValueArb);
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/compile_typescript_code.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getImports(main: string, experimental: boolean): string {
import 'azle/src/lib/stable/globals';
import 'azle/src/lib/experimental/globals';
import 'reflect-metadata';
import 'reflect-metadata';
// TODO remove the ethersGetUrl registration once we implement lower-level http for ethers
import { ethersGetUrl, Server } from 'azle/src/lib/experimental';
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ serde_json = "1.0.107"

ic-wasi-polyfill = "0.5.0"

wasmedge_quickjs = { git = "https://github.com/demergent-labs/wasmedge-quickjs", rev = "c21ff69f442998e4cda4619166e23a9bc91418be" }
wasmedge_quickjs = { git = "https://github.com/demergent-labs/wasmedge-quickjs", rev = "573c6c07316de64e4bb9a9561b079f265fd9bcc4" }
# wasmedge_quickjs = { path = "/home/wasmedge-quickjs" }
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/arg_data_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_array_buffer(&ic_cdk::api::call::arg_data_raw())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/call_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::{run_event_loop, RUNTIME};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let promise_id = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/caller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_array_buffer(ic_cdk::api::caller().as_slice())
.into()
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/rust/canister/src/ic/candid_compiler.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use wasmedge_quickjs::{Context, JsArrayBuffer, JsFn, JsValue};
use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let candid_path = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/candid_decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let candid_encoded = if let JsValue::ArrayBuffer(js_array_buffer) = argv.get(0).unwrap() {
js_array_buffer.to_vec()
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/rust/canister/src/ic/candid_encode.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use wasmedge_quickjs::{Context, JsArrayBuffer, JsFn, JsValue};
use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let candid_string = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/canister_balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_string(&ic_cdk::api::canister_balance128().to_string())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/canister_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_string(&ic_cdk::api::canister_version().to_string())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/clear_timer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let timer_id_string = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/data_certificate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
match ic_cdk::api::data_certificate() {
Some(data_certificate_vec_u8) => {
context.new_array_buffer(&data_certificate_vec_u8).into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context.new_string(&ic_cdk::id().to_text()).into()
}
}
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/instruction_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_string(&ic_cdk::api::instruction_counter().to_string())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/is_controller.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let principal_bytes = if let JsValue::ArrayBuffer(js_array_buffer) = argv.get(0).unwrap() {
js_array_buffer.to_vec()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/method_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context.new_string(&ic_cdk::api::call::method_name()).into()
}
}
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/msg_cycles_accept.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let max_amount_string = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/msg_cycles_available.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_string(&ic_cdk::api::call::msg_cycles_available128().to_string())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/msg_cycles_refunded.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, _argv: &[JsValue]) -> JsValue {
context
.new_string(&ic_cdk::api::call::msg_cycles_refunded128().to_string())
.into()
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/notify_raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let canister_id_bytes = if let JsValue::ArrayBuffer(js_array_buffer) = argv.get(0).unwrap()
{
js_array_buffer.to_vec()
Expand Down
5 changes: 2 additions & 3 deletions src/compiler/rust/canister/src/ic/performance_counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let counter_type_string = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand All @@ -11,8 +11,7 @@ impl JsFn for NativeFunction {

context
.new_string(
&ic_cdk::api::call::performance_counter(counter_type_string.parse().unwrap())
.to_string(),
&ic_cdk::api::performance_counter(counter_type_string.parse().unwrap()).to_string(),
)
.into()
}
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/print.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let first_arg_option = argv.get(0);

if let Some(first_arg) = first_arg_option {
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/rust/canister/src/ic/reject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasmedge_quickjs::{Context, JsFn, JsValue};

pub struct NativeFunction;
impl JsFn for NativeFunction {
fn call(context: &mut Context, this_val: JsValue, argv: &[JsValue]) -> JsValue {
fn call(_context: &mut Context, _this_val: JsValue, argv: &[JsValue]) -> JsValue {
let message = if let JsValue::String(js_string) = argv.get(0).unwrap() {
js_string.to_string()
} else {
Expand Down
Loading

0 comments on commit c7b4649

Please sign in to comment.