Switch from .to_string() to .to_owned()
This commit is contained in:
parent
3ecd434580
commit
654bc5c7f8
6 changed files with 13 additions and 13 deletions
src/post_history
|
@ -71,7 +71,7 @@ impl SeriesHistory {
|
|||
}
|
||||
|
||||
pub(crate) fn set_series(&mut self, series: &str, data: PostHistory) {
|
||||
self.series.entry(series.to_string()).and_modify(|val| {
|
||||
self.series.entry(series.to_owned()).and_modify(|val| {
|
||||
*val = data.clone()
|
||||
})
|
||||
.or_insert(data);
|
||||
|
@ -88,14 +88,14 @@ impl PostHistory {
|
|||
match self.parts.get(part) {
|
||||
Some(history) => history.clone(),
|
||||
None => PostHistoryInner {
|
||||
volume: "".to_string(),
|
||||
chapter: "".to_string(),
|
||||
volume: "".to_owned(),
|
||||
chapter: "".to_owned(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn set_part(&mut self, part: &str, data: PostHistoryInner) {
|
||||
self.parts.entry(part.to_string()).and_modify(|val| {
|
||||
self.parts.entry(part.to_owned()).and_modify(|val| {
|
||||
*val = data.clone()
|
||||
})
|
||||
.or_insert(data);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue