Skip to content

Commit 8224ef3

Browse files
committed
Drop useless 'ast
1 parent 63840f7 commit 8224ef3

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

xml-schema/src/processor2.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pub enum RecursiveSimpleType<'input> {
124124
}
125125

126126
#[derive(Debug)]
127-
pub struct SimpleToplevel<'ast, 'input: 'ast> {
127+
pub struct SimpleToplevel<'input> {
128128
pub target_namespace: Option<&'input str>,
129129
pub element_form_default_qualified: bool,
130130
pub attribute_form_default_qualified: bool,
@@ -133,7 +133,6 @@ pub struct SimpleToplevel<'ast, 'input: 'ast> {
133133
pub complex_types: HashMap<FullName<'input>, RecursiveComplexType<'input>>,
134134
pub groups: HashMap<FullName<'input>, RecursiveComplexType<'input>>,
135135
pub attribute_groups: HashMap<FullName<'input>, Attrs<'input>>,
136-
_phantom: PhantomData<&'ast ()>, // Sometimes I need 'ast when prototyping
137136
}
138137

139138
fn hashmap_map<K: Hash + Eq, V1, V2, F>(map: HashMap<K, V1>, mut mapper: F) -> HashMap<K, V2>
@@ -143,8 +142,8 @@ where
143142
map.into_iter().map(|(k, v)| (k, mapper(v))).collect()
144143
}
145144

146-
impl<'ast, 'input: 'ast> SimpleToplevel<'ast, 'input> {
147-
pub fn new_from_toplevel(toplevel: Toplevel<'ast, 'input>) -> SimpleToplevel<'ast, 'input> {
145+
impl<'input> SimpleToplevel<'input> {
146+
pub fn new_from_toplevel<'ast>(toplevel: Toplevel<'ast, 'input>) -> SimpleToplevel<'input> {
148147
let Toplevel {
149148
target_namespace,
150149
element_form_default_qualified,
@@ -175,7 +174,6 @@ impl<'ast, 'input: 'ast> SimpleToplevel<'ast, 'input> {
175174
attribute_groups: hashmap_map(attribute_groups, |g| {
176175
processor.process_toplevel_attribute_group(g)
177176
}),
178-
_phantom: PhantomData::default(),
179177
}
180178
}
181179
}

0 commit comments

Comments
 (0)