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

Commit

Permalink
update set_scalar docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
finiteprods committed Feb 3, 2021
1 parent 5976e3a commit a046434
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rust/xaynet-mobile/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@ impl Settings {
}

/// Set the scalar to use for masking
///
/// # Panics
/// Panics if a `Scalar` cannot be constructed from the given `scalar`.
pub fn set_scalar(&mut self, scalar: f64) {
self.scalar = Scalar::from_primitive(scalar).unwrap() // FIXME better to avoid f64
self.scalar = Scalar::from_primitive(scalar).unwrap()
}

/// Set the Xaynet coordinator address
Expand Down

0 comments on commit a046434

Please sign in to comment.