Skip to content

Commit

Permalink
build: bump version of rust
Browse files Browse the repository at this point in the history
  • Loading branch information
bpowers committed Jun 19, 2024
1 parent 5edf632 commit 1651ed2
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 45 deletions.
72 changes: 36 additions & 36 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[toolchain]
channel = "1.78.0"
channel = "1.79.0"
components = [ "cargo", "rustfmt", "rustc", "clippy" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"
6 changes: 1 addition & 5 deletions src/simlin-compat/src/xmile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -901,11 +901,7 @@ impl From<Unit> for datamodel::Unit {
name: unit.name,
equation: unit.eqn.filter(|eqn| !eqn.is_empty()),
disabled: matches!(unit.disabled, Some(true)),
aliases: if let Some(aliases) = unit.alias {
aliases
} else {
vec![]
},
aliases: unit.alias.unwrap_or_default(),
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/simlin-engine/src/compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1482,7 +1482,7 @@ impl<'module> Compiler<'module> {
BuiltinFn::Lookup(_, _, _) | BuiltinFn::IsModuleInput(_, _) => unreachable!(),
BuiltinFn::Inf | BuiltinFn::Pi => {
let lit = match builtin {
BuiltinFn::Inf => std::f64::INFINITY,
BuiltinFn::Inf => f64::INFINITY,
BuiltinFn::Pi => std::f64::consts::PI,
_ => unreachable!(),
};
Expand Down Expand Up @@ -1820,7 +1820,7 @@ impl<'a> ModuleEvaluator<'a> {
BuiltinFn::Arcsin(a) => self.eval(a).asin(),
BuiltinFn::Arctan(a) => self.eval(a).atan(),
BuiltinFn::Exp(a) => self.eval(a).exp(),
BuiltinFn::Inf => std::f64::INFINITY,
BuiltinFn::Inf => f64::INFINITY,
BuiltinFn::Pi => std::f64::consts::PI,
BuiltinFn::Int(a) => self.eval(a).floor(),
BuiltinFn::IsModuleInput(ident, _) => {
Expand Down
2 changes: 1 addition & 1 deletion src/simlin-engine/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ fn apply(func: BuiltinId, time: f64, dt: f64, a: f64, b: f64, c: f64) -> f64 {
BuiltinId::Arctan => a.atan(),
BuiltinId::Cos => a.cos(),
BuiltinId::Exp => a.exp(),
BuiltinId::Inf => std::f64::INFINITY,
BuiltinId::Inf => f64::INFINITY,
BuiltinId::Int => a.floor(),
BuiltinId::Ln => a.ln(),
BuiltinId::Log10 => a.log10(),
Expand Down

0 comments on commit 1651ed2

Please sign in to comment.