Skip to content

Commit 2fda613

Browse files
committed
use static string in dkg/error
1 parent c31a865 commit 2fda613

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/dkg/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ use core::fmt::Debug;
1010

1111
#[derive(Debug)]
1212
pub enum Error {
13-
InvalidInput(String),
13+
// TODO(jwp): potentially remove these to reduce binary size
14+
InvalidInput(&'static str),
1415
FrostError(frost::Error),
1516
EncryptionError(io::Error),
1617
DecryptionError(io::Error),

src/dkg/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
/* This Source Code Form is subject to the terms of the Mozilla Public
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4-
#[cfg(feature = "std")]
54
pub mod error;
65
pub mod group_key;
7-
#[cfg(feature = "std")]
86
pub mod round1;
97
#[cfg(feature = "std")]
108
pub mod round2;

src/dkg/round1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ use crate::multienc;
1919
use crate::participant;
2020
use crate::participant::Identity;
2121
use crate::serde::read_u16;
22+
#[cfg(feature = "std")]
2223
use crate::serde::read_variable_length;
24+
#[cfg(feature = "std")]
2325
use crate::serde::read_variable_length_bytes;
2426
use crate::serde::write_u16;
2527
use crate::serde::write_variable_length;

0 commit comments

Comments
 (0)