Normalize indentation when refactoring

This commit is contained in:
Antonio Scandurra 2023-08-24 12:45:21 +02:00
parent 985397b55c
commit 481bcbf204
2 changed files with 87 additions and 7 deletions

View file

@ -384,6 +384,16 @@ impl<'a> From<&'a str> for Rope {
}
}
impl<'a> FromIterator<&'a str> for Rope {
fn from_iter<T: IntoIterator<Item = &'a str>>(iter: T) -> Self {
let mut rope = Rope::new();
for chunk in iter {
rope.push(chunk);
}
rope
}
}
impl From<String> for Rope {
fn from(text: String) -> Self {
Rope::from(text.as_str())