1
1
mirror of https://github.com/casey/just.git synced 2024-11-22 02:09:44 +03:00

More pr comments

This commit is contained in:
Greg Shuflin 2024-10-31 23:03:29 -07:00
parent a452435052
commit b64704592b
2 changed files with 9 additions and 7 deletions

View File

@ -1,3 +1,5 @@
use std::collections::{self};
use super::*;
#[derive(
@ -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> {

View File

@ -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}]")?;
}