Skip to content

Commit

Permalink
feat: 🎸 impl DerefMut for Diagnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
IWANABETHATGUY committed Sep 5, 2024
1 parent 9b984b3 commit ccb803a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/oxc_diagnostics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ mod service;
use std::{
borrow::Cow,
fmt::{self, Display},
ops::Deref,
ops::{Deref, DerefMut},
};

pub use crate::{
Expand Down Expand Up @@ -42,6 +42,12 @@ impl Deref for OxcDiagnostic {
}
}

impl DerefMut for OxcDiagnostic {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.inner
}
}

#[derive(Debug, Default, Clone)]
pub struct OxcCode {
pub scope: Option<Cow<'static, str>>,
Expand Down

0 comments on commit ccb803a

Please sign in to comment.