Skip to content

Commit

Permalink
very minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Ten0 committed Oct 20, 2024
1 parent 476cb22 commit 148200b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
[workspace.lints.clippy]
explicit_auto_deref = "allow"
missing_safety_doc = "deny"
needless_lifetimes = "allow"
single_match = "allow"
tabs_in_doc_comments = "allow"
undocumented_unsafe_blocks = "deny"
Expand Down
2 changes: 1 addition & 1 deletion serde_avro_fast/src/schema/self_referential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ impl<'a> std::fmt::Debug for SchemaNode<'a> {
use std::cell::Cell;
struct SchemaNodeRenderingDepthGuard;
thread_local! {
static DEPTH: Cell<u32> = Cell::new(0);
static DEPTH: Cell<u32> = const { Cell::new(0) };
}
impl Drop for SchemaNodeRenderingDepthGuard {
fn drop(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion serde_avro_fast/src/ser/serializer/decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ where
if !scale_to_write.is_empty() {
state
.writer
.write_all(&scale_to_write)
.write_all(scale_to_write)
.map_err(SerError::io)?;
}
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion serde_avro_fast/tests/round_trips.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ fn test_big_decimal() {

assert_eq!(
apache_avro::to_avro_datum(
&&apache_avro::Schema::BigDecimal,
&apache_avro::Schema::BigDecimal,
Value::BigDecimal("-0.2".parse().unwrap())
)
.unwrap(),
Expand Down

0 comments on commit 148200b

Please sign in to comment.