Fix Clippy lints
This commit is contained in:
@@ -89,7 +89,7 @@ pub fn remote_game_view(
|
|||||||
has_started,
|
has_started,
|
||||||
..
|
..
|
||||||
}) => {
|
}) => {
|
||||||
alert(&format!("Joined room {}", room_name));
|
alert(&format!("Joined room {room_name}"));
|
||||||
is_started.set(has_started);
|
is_started.set(has_started);
|
||||||
}
|
}
|
||||||
Ok(ServerMessage::PlayerTurn(player_id)) => {
|
Ok(ServerMessage::PlayerTurn(player_id)) => {
|
||||||
@@ -97,7 +97,7 @@ pub fn remote_game_view(
|
|||||||
is_started.set(true);
|
is_started.set(true);
|
||||||
}
|
}
|
||||||
r => {
|
r => {
|
||||||
alert(&format!("{:?}", r));
|
alert(&format!("{r:?}"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@@ -104,7 +104,7 @@ fn shunting_yard(tokens: &[Token]) -> Result<Vec<DecimalToken>, ()> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => panic!("Unexpected token: {:?}", token),
|
_ => panic!("Unexpected token: {token:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ fn evaluate_rpn(tokens: &[DecimalToken]) -> Result<f64, ()> {
|
|||||||
};
|
};
|
||||||
stack.push(result);
|
stack.push(result);
|
||||||
}
|
}
|
||||||
_ => panic!("Unexpected token: {:?}", token),
|
_ => panic!("Unexpected token: {token:?}"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -13,10 +13,10 @@ pub enum Expression {
|
|||||||
impl fmt::Display for Expression {
|
impl fmt::Display for Expression {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||||
match self {
|
match self {
|
||||||
Expression::Digit(value) => write!(f, "{}", value),
|
Expression::Digit(value) => write!(f, "{value}"),
|
||||||
Expression::Parentheses(expr) => write!(f, "({})", expr),
|
Expression::Parentheses(expr) => write!(f, "({expr})"),
|
||||||
Expression::Binary(operator, left, right) => {
|
Expression::Binary(operator, left, right) => {
|
||||||
write!(f, "{} {} {}", left, operator, right)
|
write!(f, "{left} {operator} {right}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user