Skip to content

Commit

Permalink
ran clippy and cargo-fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
skewballfox committed Jun 23, 2024
1 parent bc3ec35 commit 1887444
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
2 changes: 0 additions & 2 deletions crates/burn-import/src/burn/ty.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use onnx_ir::ir::ElementType;
use proc_macro2::Ident;
use proc_macro2::Span;
use proc_macro2::TokenStream;
use quote::quote;

use crate::burn::ToTokens;
use onnx_ir::ir::{ArgType, Argument as OnnxArgument, TensorType as OnnxTensorType};

#[derive(Debug, Clone)]
pub struct TensorType {
Expand Down
14 changes: 3 additions & 11 deletions crates/burn-import/src/onnx/to_burn.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ use super::op_configuration::{
use onnx_ir::{
convert_constant_value,
ir::{
self, ArgType, Argument as OnnxArgument, Data, ElementType, Node as OnnxNode, NodeType,
ArgType, Argument as OnnxArgument, Data, ElementType, Node as OnnxNode, NodeType,
OnnxGraph, TensorType as OnnxTensorType,
},
parse_onnx,
Expand Down Expand Up @@ -728,11 +728,7 @@ impl ParsedOnnxGraph {
}

fn sum_conversion(node: OnnxNode) -> SumNode {
let inputs = node
.inputs
.iter()
.map(|input| TensorType::from(input))
.collect();
let inputs = node.inputs.iter().map(TensorType::from).collect();
let output = TensorType::from(node.outputs.first().unwrap());

SumNode::new(inputs, output)
Expand Down Expand Up @@ -784,11 +780,7 @@ impl ParsedOnnxGraph {
}

fn concat_conversion(node: OnnxNode) -> ConcatNode {
let inputs = node
.inputs
.iter()
.map(|input| TensorType::from(input))
.collect();
let inputs = node.inputs.iter().map(TensorType::from).collect();

let output = TensorType::from(node.outputs.first().unwrap());
let dim = concat_config(&node);
Expand Down

0 comments on commit 1887444

Please sign in to comment.