Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lints #116

Merged
merged 3 commits into from
Nov 21, 2023
Merged

Lints #116

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- run: cargo clippy --all-features -- -W clippy::all -W clippy::pedantic -W clippy::nursery --deny warnings
- run: cargo clippy --no-default-features -- -W clippy::all -W clippy::pedantic -W clippy::nursery --deny warnings
- run: cargo clippy --all-features -- -W future-incompatible -W rust_2018_idioms -W clippy::all -W clippy::pedantic -W clippy::nursery --deny warnings
- run: cargo clippy --no-default-features -- -W future-incompatible -W rust_2018_idioms -W clippy::all -W clippy::pedantic -W clippy::nursery --deny warnings
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ keywords = ["EDN"]
license = "MIT"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lints.rust]
rust_2018_idioms = "warn"
future-incompatible = "warn"

[lints.clippy]
pedantic = "warn"
nursery = "warn"

[features]
async = ["futures"]
Expand Down
2 changes: 1 addition & 1 deletion benches/serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ mod serde {

pub fn criterion_benchmark(c: &mut Criterion) {
c.bench_function("serde", |b| {
b.iter(|| serde_json::to_string(&val()).unwrap())
b.iter(|| serde_json::to_string(&val()).unwrap());
});
}

Expand Down
10 changes: 5 additions & 5 deletions src/deserialize/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ mod test {
let nil = "nil";
let unit: () = from_str(nil).unwrap();

assert_eq!(unit, ())
assert_eq!(unit, ());
}

#[test]
Expand All @@ -471,7 +471,7 @@ mod test {
"Cannot safely deserialize Set(Set({Str(\"a\"), Str(\"b\"), UInt(5)})) to BTreeSet"
.to_string()
))
)
);
}

#[test]
Expand Down Expand Up @@ -565,7 +565,7 @@ mod test {
Edn::Vector(Vector::new(vec![Edn::Str(
"hello brave new world".to_string()
)]))
)
);
}

#[test]
Expand All @@ -592,7 +592,7 @@ mod test {
assert_eq!(
edn,
Edn::Uuid("af6d8699-f442-4dfd-8b26-37d80543186b".to_string())
)
);
}

#[test]
Expand All @@ -603,7 +603,7 @@ mod test {
}
impl Deserialize for Foo {
fn deserialize(edn: &Edn) -> Result<Self, Error> {
Ok(Foo {
Ok(Self {
bar: from_edn(&edn[":bar"])?,
})
}
Expand Down
Loading