Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove all warnings #1516

Merged
merged 1 commit into from
Oct 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runtime/near-vm-logic/tests/fixtures.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use near_vm_logic::VMContext;

#[allow(dead_code)]
pub fn get_context(input: Vec<u8>, is_view: bool) -> VMContext {
VMContext {
current_account_id: "alice.near".to_string(),
Expand Down
2 changes: 1 addition & 1 deletion runtime/near-vm-logic/tests/test_miscs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ fn test_hash256() {

logic.sha256(data.len() as _, data.as_ptr() as _, 0).unwrap();
let res = &vec![0u8; 32];
logic.read_register(0, res.as_ptr() as _);
let _ = logic.read_register(0, res.as_ptr() as _);
assert_eq!(
res,
&[
Expand Down
1 change: 1 addition & 0 deletions runtime/near-vm-logic/tests/test_view_method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ macro_rules! test_prohibited {
let config = Config::default();
let promise_results = vec![];
let mut memory = MockedMemory::default();
#[allow(unused_mut)]
let mut logic = VMLogic::new(&mut ext, context, &config, &promise_results, &mut memory);

let name = stringify!($f);
Expand Down
2 changes: 2 additions & 0 deletions runtime/near-vm-runner/tests/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ pub fn make_simple_contract_call_with_gas(
run(code_hash, code, method_name, &mut fake_external, context, &config, &promise_results)
}

#[allow(dead_code)]
pub fn make_simple_contract_call(
code: &[u8],
method_name: &[u8],
) -> (Option<VMOutcome>, Option<VMError>) {
make_simple_contract_call_with_gas(code, method_name, 1_000_000)
}

#[allow(dead_code)]
pub fn wat2wasm_no_validate(wat: &str) -> Vec<u8> {
Wat2Wasm::new().validate(false).convert(wat).unwrap().as_ref().to_vec()
}