Skip to content

Commit

Permalink
More pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
neunenak committed Nov 1, 2024
1 parent c430df3 commit fe755a7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
14 changes: 8 additions & 6 deletions src/attribute.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::collections::{self};

use super::*;

#[derive(
Expand Down Expand Up @@ -136,14 +138,14 @@ impl<'src> Display for Attribute<'src> {
#[derive(Default, Debug, Clone, PartialEq, Serialize)]
pub(crate) struct AttributeSet<'src>(BTreeSet<Attribute<'src>>);

impl<'src> IntoIterator for &AttributeSet<'src> {
type Item = &'src Attribute<'src>;
impl<'src, 'a> IntoIterator for &'a AttributeSet<'src> {
type Item = &'a Attribute<'src>;

type IntoIter;
type IntoIter = collections::btree_set::Iter<'a, Attribute<'src>>;

fn into_iter(self) -> Self::IntoIter {
todo!()
}
fn into_iter(self) -> Self::IntoIter {
self.0.iter()
}
}

impl<'src> AttributeSet<'src> {
Expand Down
2 changes: 1 addition & 1 deletion src/recipe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ impl<'src, D: Display> ColorDisplay for Recipe<'src, D> {
writeln!(f, "# {doc}")?;
}

for attribute in self.attributes.iter() {
for attribute in &self.attributes {
writeln!(f, "[{attribute}]")?;
}

Expand Down

0 comments on commit fe755a7

Please sign in to comment.