Skip to content

Commit

Permalink
Eliminate redundant RcVec::new
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jul 25, 2022
1 parent 20eb5ed commit 0fbcf3b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion src/fallback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ impl LexError {
impl TokenStream {
pub fn new() -> Self {
TokenStream {
inner: RcVec::new(),
inner: RcVecBuilder::new().build(),
}
}

Expand Down
6 changes: 0 additions & 6 deletions src/rcvec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ pub(crate) struct RcVecIntoIter<T> {
}

impl<T> RcVec<T> {
pub fn new() -> Self {
RcVec {
inner: Rc::new(Vec::new()),
}
}

pub fn is_empty(&self) -> bool {
self.inner.is_empty()
}
Expand Down

0 comments on commit 0fbcf3b

Please sign in to comment.