commit 00ba4d7d8dbcd8686722b922f2f749431f8575dd from: Romain VINCENT date: Sat Jan 10 10:43:01 2026 UTC More canonical this way. commit - 42c207aa93594ebc908a3c7f38aac5911b4e595e commit + 00ba4d7d8dbcd8686722b922f2f749431f8575dd blob - fafd495303fcdc34860ba9a3799c2ff4e6560af5 blob + d56f0bb587161ce5d3c502e8725f2036ffc8c7aa --- eur-lex-scraper-naive/src/models/articles.rs +++ eur-lex-scraper-naive/src/models/articles.rs @@ -1,4 +1,4 @@ -use crate::models::enacting_terms::{IntoItem, Item}; +use crate::models::enacting_terms::Item; #[derive(Debug, Default, PartialEq, Eq)] pub struct Article { @@ -6,7 +6,7 @@ pub struct Article { pub text: String, } -impl IntoItem for Article { +impl Into for Article { fn into(self) -> super::enacting_terms::Item { Item::Article(self) } blob - 2c542a296f1ac02fbe95809350d0415a5359c777 blob + 0e4d0727da318cfba1bf97599d6c313d32ee3971 --- eur-lex-scraper-naive/src/models/enacting_terms.rs +++ eur-lex-scraper-naive/src/models/enacting_terms.rs @@ -1,9 +1,5 @@ use crate::models::articles::Article; -pub trait IntoItem { - fn into(self) -> Item; -} - #[derive(Debug, PartialEq, Eq)] pub enum Item { Article(Article), @@ -44,7 +40,7 @@ pub struct EnactingTerms { } impl EnactingTerms { - pub fn push(&mut self, item: impl IntoItem) { + pub fn push(&mut self, item: impl Into) { self.items.push(item.into()); } } @@ -55,12 +51,12 @@ pub struct Chapter { } impl Chapter { - pub fn push(&mut self, item: impl IntoItem) { + pub fn push(&mut self, item: impl Into) { self.items.push(item.into()); } } -impl IntoItem for Chapter { +impl Into for Chapter { fn into(self) -> Item { Item::Chapter(self) } @@ -77,7 +73,7 @@ impl Section { } } -impl IntoItem for Section { +impl Into for Section { fn into(self) -> Item { Item::Section(self) }