Skip to content

Commit

Permalink
style: fix clippy warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Yaroslav Bolyukin <[email protected]>
  • Loading branch information
CertainLach committed Jul 12, 2021
1 parent 8a68344 commit 6451b30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/jrsonnet-evaluator/src/builtin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ fn builtin_exp(context: Context, _loc: Option<&ExprLocation>, args: &ArgsDesc) -

fn frexp(s: f64) -> (f64, i16) {
if 0.0 == s {
return (s, 0);
(s, 0)
} else {
let lg = s.abs().log2();
let x = (lg - lg.floor() - 1.0).exp2();
Expand Down
4 changes: 2 additions & 2 deletions crates/jrsonnet-evaluator/src/typed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ pub enum TypeError {
UnionFailed(ComplexValType, TypeLocErrorList),
#[error(
"number out of bounds: {0} not in {}..{}",
.1.map(|v|v.to_string()).unwrap_or("".to_owned()),
.2.map(|v|v.to_string()).unwrap_or("".to_owned()),
.1.map(|v|v.to_string()).unwrap_or_else(|| "".to_owned()),
.2.map(|v|v.to_string()).unwrap_or_else(|| "".to_owned()),
)]
BoundsFailed(f64, Option<f64>, Option<f64>),
}
Expand Down

0 comments on commit 6451b30

Please sign in to comment.