Skip to content

Commit

Permalink
Fix all clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
BradenEverson committed Apr 7, 2024
1 parent bf799fe commit a988d91
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
22 changes: 11 additions & 11 deletions src/core/graph/consteval.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,27 +446,27 @@ impl Context {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
if let None = self.nodes[b].is_const() {
if self.nodes[b].is_const().is_none() {
to_visit.push(b);
}
}
Operation::Neg(a) => {
if let None = self.nodes[a].is_const() {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
}
Operation::Exp(a) => {
if let None = self.nodes[a].is_const() {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
}
Operation::Log(a) => {
if let None = self.nodes[a].is_const() {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
}
Operation::Transpose(a, _) => {
if let None = self.nodes[a].is_const() {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
}
Expand All @@ -483,7 +483,7 @@ impl Context {
to_visit.push(a);
}

if let None = self.nodes[b].is_const() {
if self.nodes[b].is_const().is_none() {
to_visit.push(b);
}
}
Expand All @@ -492,7 +492,7 @@ impl Context {
| Operation::Reshape(a)
| Operation::ZerosLike(a)
| Operation::OneHot(a) => {
if let None = self.nodes[a].is_const() {
if self.nodes[a].is_const().is_none() {
to_visit.push(a);
}
}
Expand All @@ -507,7 +507,7 @@ impl Context {
if self.nodes[on_true].is_const().is_none() {
to_visit.push(on_true)
}
if let None = self.nodes[on_false].is_const() {
if self.nodes[on_false].is_const().is_none() {
to_visit.push(on_false)
}
}
Expand All @@ -518,20 +518,20 @@ impl Context {
stride: _,
dim: _,
} => {
if let None = self.nodes[node].is_const() {
if self.nodes[node].is_const().is_none() {
to_visit.push(node);
}
}
Operation::TileInDim { node, n_tiles: _, dim: _ } => {
if let None = self.nodes[node].is_const() {
if self.nodes[node].is_const().is_none() {
to_visit.push(node);
}
}
Operation::ReduceMax { node, dim: _ }
| Operation::ReduceSum { node, dim: _ }
| Operation::ReduceMean { node, dim:_ }
| Operation:: ReduceArgmax { node, dim: _ } => {
if let None = self.nodes[node].is_const() {
if self.nodes[node].is_const().is_none() {
to_visit.push(node);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/model/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod model;
pub mod model_state;
pub mod model_builder;
2 changes: 1 addition & 1 deletion src/core/model/model.rs → src/core/model/model_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ impl Model {
pub fn new() -> Self {
todo!();
}
pub fn compile() -> Self {
pub fn compile(&mut self) -> Self {
todo!();
}
}

0 comments on commit a988d91

Please sign in to comment.