Skip to content

Commit

Permalink
syntest variable name display
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodesdev committed Jun 7, 2024
1 parent de8da4a commit 2428377
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/syntest/src/syntest.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use std::fmt::Display;
use std::fs;
use std::path::PathBuf;
use syn::{
Expand Down Expand Up @@ -443,6 +444,12 @@ impl LocalVariable {
}
}

impl Display for LocalVariable {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.name())
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down

0 comments on commit 2428377

Please sign in to comment.