Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edytapawlak committed Mar 21, 2024
1 parent c4d0e3b commit 267b39e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions oca-bundle/src/state/oca/capture_base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ where
ser.end()
}

pub fn serialize_flagged_attributes<S>(attributes: &Vec<String>, s: S) -> Result<S::Ok, S::Error>
pub fn serialize_flagged_attributes<S>(attributes: &[String], s: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut ser = s.serialize_seq(Some(attributes.len()))?;

let mut sorted_flagged_attributes = attributes.clone();
let mut sorted_flagged_attributes = attributes.to_owned();
sorted_flagged_attributes.sort();
for attr in sorted_flagged_attributes {
ser.serialize_element(&attr)?;
Expand Down
4 changes: 2 additions & 2 deletions oca-bundle/src/state/oca/overlay/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ where
ser.end()
}

pub fn serialize_categories<S>(attributes: &Vec<String>, s: S) -> Result<S::Ok, S::Error>
pub fn serialize_categories<S>(attributes: &[String], s: S) -> Result<S::Ok, S::Error>
where
S: Serializer,
{
let mut ser = s.serialize_seq(Some(attributes.len()))?;

let mut sorted_flagged_attributes = attributes.clone();
let mut sorted_flagged_attributes = attributes.to_owned();
sorted_flagged_attributes.sort();
for attr in sorted_flagged_attributes {
ser.serialize_element(&attr)?;
Expand Down

0 comments on commit 267b39e

Please sign in to comment.