mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-27 12:58:13 +08:00
Fix all Clippy warnings (#1936)
* Fix all Clippy warnings * More fixes * Bump criterion version --------- Co-authored-by: dennis@kobert.dev <dennis@kobert.dev>
This commit is contained in:
co-authored by
dennis@kobert.dev
parent
858efb65bb
commit
15d125d8e7
@@ -1,5 +1,7 @@
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
use graph_craft::{document::NodeNetwork, graphene_compiler::Compiler, proto::ProtoNetwork};
|
||||
use graph_craft::document::NodeNetwork;
|
||||
use graph_craft::graphene_compiler::Compiler;
|
||||
use graph_craft::proto::ProtoNetwork;
|
||||
|
||||
pub fn compile_to_proto(c: &mut Criterion) {
|
||||
let artworks = glob::glob("../../demo-artwork/*.graphite").expect("failed to read glob pattern");
|
||||
@@ -14,9 +16,8 @@ pub fn compile_to_proto(c: &mut Criterion) {
|
||||
}
|
||||
|
||||
fn load_network(document_string: &str) -> NodeNetwork {
|
||||
let document: serde_json::Value = serde_json::from_str(&document_string).expect("Failed to parse document");
|
||||
let network = serde_json::from_value::<NodeNetwork>(document["network_interface"]["network"].clone()).expect("Failed to parse document");
|
||||
network
|
||||
let document: serde_json::Value = serde_json::from_str(document_string).expect("Failed to parse document");
|
||||
serde_json::from_value::<NodeNetwork>(document["network_interface"]["network"].clone()).expect("Failed to parse document")
|
||||
}
|
||||
fn compile(network: NodeNetwork) -> ProtoNetwork {
|
||||
let compiler = Compiler {};
|
||||
|
||||
Reference in New Issue
Block a user