Skip to content

Commit a8a7f72

Browse files
noahsmartinclaude
andcommitted
ref(build): Remove redundant is_empty_slice helper function
Use standard <[_]>::is_empty pattern for skip_serializing_if attribute, consistent with artifact.rs. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 9b482b8 commit a8a7f72

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/api/data_types/chunking/build.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ use sha1_smol::Digest;
55

66
use super::ChunkedFileState;
77

8-
fn is_empty_slice<T>(slice: &[T]) -> bool {
9-
slice.is_empty()
10-
}
11-
128
#[derive(Debug, Serialize)]
139
pub struct ChunkedBuildRequest<'a> {
1410
pub checksum: Digest,
@@ -17,7 +13,7 @@ pub struct ChunkedBuildRequest<'a> {
1713
pub build_configuration: Option<&'a str>,
1814
#[serde(skip_serializing_if = "Option::is_none")]
1915
pub release_notes: Option<&'a str>,
20-
#[serde(skip_serializing_if = "is_empty_slice")]
16+
#[serde(skip_serializing_if = "<[_]>::is_empty")]
2117
pub install_groups: &'a [String],
2218
#[serde(flatten)]
2319
pub vcs_info: &'a VcsInfo<'a>,

0 commit comments

Comments
 (0)