Cargo update.

This commit is contained in:
2019-05-28 09:31:28 +02:00
parent a1d3861a76
commit f7958c47bc
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ pub struct Gaussian {
}
impl fmt::Debug for Gaussian {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"N(mu={:.03}, sigma={:.03}, pi={:.03}, tau={:.03})",

View File

@@ -1,4 +1,5 @@
#![allow(clippy::unreadable_literal, clippy::excessive_precision)]
#![warn(rust_2018_idioms)]
mod factor_graph;
mod gaussian;
@@ -108,12 +109,12 @@ fn draw_margin(p: f64, beta: f64, total_players: f64) -> f64 {
}
pub struct TrueSkill {
mu: f64,
sigma: f64,
// mu: f64,
// sigma: f64,
pub beta: f64,
pub tau: f64,
pub draw_probability: f64,
delta: f64,
// delta: f64,
}
impl TrueSkill {
@@ -357,12 +358,12 @@ impl TrueSkill {
impl Default for TrueSkill {
fn default() -> TrueSkill {
TrueSkill {
mu: MU,
sigma: SIGMA,
// mu: MU,
// sigma: SIGMA,
beta: BETA,
tau: TAU,
draw_probability: DRAW_PROBABILITY,
delta: DELTA,
// delta: DELTA,
}
}
}
@@ -370,7 +371,6 @@ impl Default for TrueSkill {
#[cfg(test)]
mod tests {
use approx::*;
use env_logger;
use super::*;

View File

@@ -115,6 +115,7 @@ impl Matrix {
if self.height == self.width && self.height == 1 {
matrix[(0, 0)] = 1.0 / self[(0, 0)];
} else {
}
matrix