Maintenance PR for clippy, license and authors (#601)
* Maintenance PR for clippy, license and authors * remove author from libraries
This commit is contained in:
6
src/env/tock/mod.rs
vendored
6
src/env/tock/mod.rs
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2022 Google LLC
|
||||
// Copyright 2022-2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -89,13 +89,13 @@ pub struct TockEnv {
|
||||
clock: TockClock,
|
||||
}
|
||||
|
||||
impl TockEnv {
|
||||
impl Default for TockEnv {
|
||||
/// Returns the unique instance of the Tock environment.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
/// - If called a second time.
|
||||
pub fn new() -> Self {
|
||||
fn default() -> Self {
|
||||
// We rely on `take_storage` to ensure that this function is called only once.
|
||||
let storage = take_storage().unwrap();
|
||||
let store = Store::new(storage).ok().unwrap();
|
||||
|
||||
6
src/env/tock/storage.rs
vendored
6
src/env/tock/storage.rs
vendored
@@ -1,4 +1,4 @@
|
||||
// Copyright 2019-2021 Google LLC
|
||||
// Copyright 2019-2023 Google LLC
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
@@ -475,7 +475,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_check_metadata() {
|
||||
let mut env = TestEnv::new();
|
||||
let mut env = TestEnv::default();
|
||||
let private_key = crypto::ecdsa::SecKey::gensk(env.rng());
|
||||
let upgrade_locations = env.upgrade_storage().unwrap();
|
||||
|
||||
@@ -536,7 +536,7 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_verify_signature() {
|
||||
let mut env = TestEnv::new();
|
||||
let mut env = TestEnv::default();
|
||||
let private_key = crypto::ecdsa::SecKey::gensk(env.rng());
|
||||
let message = [0x44; 64];
|
||||
let signed_hash = Sha256::hash(&message);
|
||||
|
||||
Reference in New Issue
Block a user