style: propagate clippy lints throughout workspace
This commit is contained in:
parent
f73914a42c
commit
8a124d20e8
6 changed files with 16 additions and 2 deletions
|
@ -9,6 +9,10 @@ resolver = "2"
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
clap = { version = "4", features = [ "derive" ] }
|
clap = { version = "4", features = [ "derive" ] }
|
||||||
|
|
||||||
|
# to enable all the lints below, this must be present in a workspace member's Cargo.toml:
|
||||||
|
# [lints]
|
||||||
|
# workspace = true
|
||||||
|
|
||||||
[workspace.lints.rust]
|
[workspace.lints.rust]
|
||||||
unsafe_code = "deny"
|
unsafe_code = "deny"
|
||||||
variant_size_differences = "warn"
|
variant_size_differences = "warn"
|
||||||
|
|
|
@ -9,3 +9,6 @@ edition = "2021"
|
||||||
clap = { workspace = true, features = [ "derive" ] }
|
clap = { workspace = true, features = [ "derive" ] }
|
||||||
image = "0.24"
|
image = "0.24"
|
||||||
rpl = { path = "../rpl" }
|
rpl = { path = "../rpl" }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
|
@ -2,7 +2,7 @@ pub mod read {
|
||||||
use image::{io::Reader as ImageReader, DynamicImage};
|
use image::{io::Reader as ImageReader, DynamicImage};
|
||||||
use rpl::instructions::read::{Read, SourceType};
|
use rpl::instructions::read::{Read, SourceType};
|
||||||
|
|
||||||
pub fn read(Read { source, format: _ }: Read) -> DynamicImage {
|
pub fn read(Read { source, .. }: Read) -> DynamicImage {
|
||||||
// TODO: actual error handling
|
// TODO: actual error handling
|
||||||
let img = ImageReader::open(match source {
|
let img = ImageReader::open(match source {
|
||||||
SourceType::File(path) => path,
|
SourceType::File(path) => path,
|
||||||
|
|
|
@ -9,3 +9,6 @@ edition = "2021"
|
||||||
clap = { workspace = true, features = [ "derive" ] }
|
clap = { workspace = true, features = [ "derive" ] }
|
||||||
rpl = { path = "../rpl" }
|
rpl = { path = "../rpl" }
|
||||||
executor = { path = "../executor" }
|
executor = { path = "../executor" }
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
|
@ -12,7 +12,8 @@ pub struct Args {
|
||||||
fn main() {
|
fn main() {
|
||||||
let args = dbg!(Args::parse());
|
let args = dbg!(Args::parse());
|
||||||
|
|
||||||
let f = fs::read_to_string(args.file).unwrap();
|
let f = fs::read_to_string(args.file)
|
||||||
|
.expect("reading IR failed — come back to this later handle errors properly");
|
||||||
let pl = rpl::from_ron(&f);
|
let pl = rpl::from_ron(&f);
|
||||||
|
|
||||||
execute_all(pl.0);
|
execute_all(pl.0);
|
||||||
|
|
|
@ -8,3 +8,6 @@ edition = "2021"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0.193", features = [ "derive" ] }
|
serde = { version = "1.0.193", features = [ "derive" ] }
|
||||||
ron = "0.8"
|
ron = "0.8"
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
Loading…
Reference in a new issue