mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-29 00:00:18 +02:00
Use .to_owned() instead of .to_string() to turn &str into String (#548)
This commit is contained in:
@@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user