mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
Use .to_owned() instead of .to_string() to turn &str into String (#548)
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
clippy::option_option,
|
||||
clippy::verbose_file_reads,
|
||||
clippy::unnested_or_patterns,
|
||||
clippy::str_to_string,
|
||||
rust_2018_idioms,
|
||||
future_incompatible,
|
||||
nonstandard_style,
|
||||
|
||||
@@ -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