Preserve indentation when fixing via LibCST (#2223)

This commit is contained in:
Charlie Marsh
2023-01-26 16:09:35 -05:00
committed by GitHub
parent 5f8810e987
commit 0cab3f8437
3 changed files with 9 additions and 1 deletions

View File

@@ -108,11 +108,17 @@ impl Default for Indentation {
}
}
impl Indentation {
pub fn as_str(&self) -> &str {
self.0.as_str()
}
}
impl Deref for Indentation {
type Target = str;
fn deref(&self) -> &Self::Target {
&self.0
self.as_str()
}
}