Skip to content

Commit

Permalink
refactor(semantic): Remove redundunt is_leading check for JSDoc (#5877)
Browse files Browse the repository at this point in the history
  • Loading branch information
leaysgur committed Sep 19, 2024
1 parent 9115dd9 commit f360e2c
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions crates/oxc_semantic/src/jsdoc/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@ pub struct JSDocBuilder<'a> {
impl<'a> JSDocBuilder<'a> {
pub fn new(source_text: &'a str, trivias: &Trivias) -> Self {
let mut not_attached_docs: FxHashMap<u32, Vec<_>> = FxHashMap::default();
for comment in trivias
.comments()
.filter(|comment| comment.is_leading() && comment.is_jsdoc(source_text))
{
for comment in trivias.comments().filter(|comment| comment.is_jsdoc(source_text)) {
not_attached_docs
.entry(comment.attached_to)
.or_default()
Expand Down

0 comments on commit f360e2c

Please sign in to comment.