mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Use boxed slices instead ovecs in decl macros
This commit is contained in:
parent
3fdff0ae4b
commit
90499d4390
3 changed files with 6 additions and 6 deletions
|
@ -20,7 +20,7 @@ use crate::{tt, tt_iter::TtIter, ParseError};
|
|||
/// Stuff to the right is a [`MetaTemplate`] template which is used to produce
|
||||
/// output.
|
||||
#[derive(Clone, Debug, PartialEq, Eq)]
|
||||
pub(crate) struct MetaTemplate(pub(crate) Vec<Op>);
|
||||
pub(crate) struct MetaTemplate(pub(crate) Box<[Op]>);
|
||||
|
||||
impl MetaTemplate {
|
||||
pub(crate) fn parse_pattern(pattern: &tt::Subtree) -> Result<MetaTemplate, ParseError> {
|
||||
|
@ -44,7 +44,7 @@ impl MetaTemplate {
|
|||
res.push(op);
|
||||
}
|
||||
|
||||
Ok(MetaTemplate(res))
|
||||
Ok(MetaTemplate(res.into_boxed_slice()))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue