Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion provider/datagen/src/transform/cldr/datetime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,9 @@ macro_rules! impl_data_provider {
);
}

#[allow(clippy::redundant_closure_call)]
Ok(DataResponse {
metadata: Default::default(),
#[allow(clippy::redundant_closure_call)]
payload: Some(DataPayload::from_owned(($expr)(
&data,
&calendar.to_string(),
Expand Down
5 changes: 1 addition & 4 deletions utils/zerovec/src/map/borrowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ where
V: ?Sized,
{
fn clone(&self) -> Self {
ZeroMapBorrowed {
keys: self.keys,
values: self.values,
}
*self
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems fine

}
}

Expand Down
7 changes: 1 addition & 6 deletions utils/zerovec/src/map2d/borrowed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ where
V: ?Sized,
{
fn clone(&self) -> Self {
ZeroMap2dBorrowed {
keys0: self.keys0,
joiner: self.joiner,
keys1: self.keys1,
values: self.values,
}
*self
}
}

Expand Down
5 changes: 1 addition & 4 deletions utils/zerovec/src/ule/tuple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,7 @@ macro_rules! tuple_ule {

impl<$($t: ULE),+> Clone for $name<$($t),+> {
fn clone(&self) -> Self {
// copy to the stack to avoid hitting a future incompat error
// https://github.com/rust-lang/rust/issues/82523#issuecomment-947900712
let stack = ($(self.$i),+);
$name($(stack.$i),+)
*self
}
}

Expand Down
12 changes: 2 additions & 10 deletions utils/zerovec/src/varzerovec/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,7 @@ pub struct VarZeroVecComponents<'a, T: ?Sized, F> {
impl<'a, T: ?Sized, F> Copy for VarZeroVecComponents<'a, T, F> {}
impl<'a, T: ?Sized, F> Clone for VarZeroVecComponents<'a, T, F> {
fn clone(&self) -> Self {
VarZeroVecComponents {
len: self.len,
indices: self.indices,
things: self.things,
entire_slice: self.entire_slice,
marker: PhantomData,
}
*self
}
}

Expand Down Expand Up @@ -569,9 +563,7 @@ where
let data_len: u32 = elements
.iter()
.map(|v| u32::try_from(v.encode_var_ule_len()).ok())
.fold(Some(0u32), |s, v| {
s.and_then(|s| v.and_then(|v| s.checked_add(v)))
})?;
.try_fold(0u32, |s, v| s.checked_add(v?))?;
let ret = idx_len.checked_add(data_len);
if let Some(r) = ret {
if r >= F::MAX_VALUE {
Expand Down