Skip to content

Commit

Permalink
Attend to review comments
Browse files Browse the repository at this point in the history
* Fix RFC link in `validate_base64url_encoding`;
* Validate each field in JWE separately and specifically;
* Fix comment for `set` function;
* Add tests for get_test_value_* functions;
* Apply lints from new Rust version.
  • Loading branch information
brizental committed Jul 17, 2020
1 parent 56c094b commit afd1408
Show file tree
Hide file tree
Showing 3 changed files with 266 additions and 129 deletions.
9 changes: 2 additions & 7 deletions glean-core/ffi/src/jwe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,10 @@ pub extern "C" fn glean_jwe_test_has_value(metric_id: u64, storage_name: FfiStr)
}

#[no_mangle]
pub extern "C" fn glean_jwe_test_get_value(
metric_id: u64,
storage_name: FfiStr,
) -> *mut c_char {
pub extern "C" fn glean_jwe_test_get_value(metric_id: u64, storage_name: FfiStr) -> *mut c_char {
with_glean_value(|glean| {
JWE_METRICS.call_infallible(metric_id, |metric| {
metric
.test_get_value(glean, storage_name.as_str())
.unwrap()
metric.test_get_value(glean, storage_name.as_str()).unwrap()
})
})
}
Expand Down
Loading

0 comments on commit afd1408

Please sign in to comment.