Skip to content
This repository has been archived by the owner on May 9, 2022. It is now read-only.

Commit

Permalink
style(exec_enclave): fix clippy lint errors on sample functions
Browse files Browse the repository at this point in the history
  • Loading branch information
longtomjr authored and PiDelport committed Jun 15, 2021
1 parent 11c8b9f commit ad0495b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions rtc_exec_enclave/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub struct Token {
binary_hash: [u8; 32],
}

pub unsafe fn request_execution(token: Token, _params: ()) -> Result<Box<[u8]>, ()> {
pub fn request_execution(token: Token, _params: ()) -> Result<Box<[u8]>, ()> {
let exec_module = match get_module_by_id(token.binary_hash) {
Some(val) => val,
None => return Err(()),
Expand All @@ -47,7 +47,7 @@ pub unsafe fn request_execution(token: Token, _params: ()) -> Result<Box<[u8]>,
// XXX: This is placeholder until we completed the data retrieval flow and know what values
// we need to pass through to the data enclave
fn get_data(_token: &Token) -> Box<[u8]> {
return vec![123; 43].into_boxed_slice();
vec![123; 43].into_boxed_slice()
}

// XXX: The implementation is only for the sample functions currently
Expand Down
2 changes: 1 addition & 1 deletion rtc_exec_enclave/src/sample_functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn median(data: &mut [f64]) -> Option<f64> {

fn mean(data: &mut [f64]) -> Option<f64> {
// If len is 0 we cannot calculate a mean
if data.len() == 0 {
if data.is_empty() {
None
} else {
let sum: f64 = data.iter().sum();
Expand Down

0 comments on commit ad0495b

Please sign in to comment.