Normalize indentation when refactoring
This commit is contained in:
parent
985397b55c
commit
481bcbf204
2 changed files with 87 additions and 7 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue