Use .to_owned() instead of .to_string() to turn &str into String (#548)

This commit is contained in:
Jonas Platte
2021-11-19 22:15:47 +00:00
committed by GitHub
parent ab9f1ef993
commit 69fee5864d
6 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -59,7 +59,7 @@ impl<B: Send + 'static> Resource<B> {
/// All routes will be nested at `/{resource_name}`.
pub fn named(resource_name: &str) -> Self {
Self {
name: resource_name.to_string(),
name: resource_name.to_owned(),
router: Default::default(),
}
}