Skip to content

Commit

Permalink
Merge pull request #4711 from aleksanderkrauze/improve-builder-str-in…
Browse files Browse the repository at this point in the history
…ner-into-string-implementation

Improve builder::str::inner::Inner::into_string implementation
  • Loading branch information
epage authored Feb 15, 2023
2 parents ad5d676 + d6e7d46 commit 62da8f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/builder/str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,10 @@ pub(crate) mod inner {
}

pub(crate) fn into_string(self) -> String {
self.as_str().to_owned()
match self {
Self::Static(s) => s.to_owned(),
Self::Owned(s) => s.into(),
}
}
}
}
Expand Down

0 comments on commit 62da8f9

Please sign in to comment.