Skip to content

Commit

Permalink
pacify clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Swatinem committed Jan 7, 2025
1 parent 618e703 commit 57bcd00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/binary/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub struct BinaryFormatWriter {
#[pymethods]
impl BinaryFormatWriter {
#[new]
#[allow(clippy::new_without_default)]
pub fn new() -> Self {
Self {
writer: Some(TestAnalyticsWriter::new(60)),
Expand Down Expand Up @@ -111,7 +112,7 @@ impl AggregationReader {
let format = TestAnalytics::parse(&buffer, timestamp)?;
// SAFETY: the lifetime of `TestAnalytics` depends on `buffer`,
// which we do not mutate, and which outlives the parsed format.
let format = unsafe { transmute(format) };
let format = unsafe { transmute::<TestAnalytics<'_>, TestAnalytics<'_>>(format) };

Ok(Self {
_buffer: buffer,
Expand Down
2 changes: 1 addition & 1 deletion src/binary/format.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<'data> TestAnalytics<'data> {
let mut matching_flags_sets: SmallVec<u32, 4> = Default::default();
for res in flag_sets {
let (offset, flag_set) = res?;
if flags.iter().any(|flag| flag_set.contains(&flag.as_ref())) {
if flags.iter().any(|flag| flag_set.contains(flag)) {
matching_flags_sets.push(offset);
}
}
Expand Down

0 comments on commit 57bcd00

Please sign in to comment.