🎨 Unifica conversiones a String con to_string()
Como `String::from()` y `.to_string()` son equivalentes, se sustituyen todas las ocurrencias de `String::from()` por `to_string()` para mayor coherencia y legibilidad.
This commit is contained in:
parent
2a4d6a7890
commit
ddf78c2de8
12 changed files with 29 additions and 29 deletions
|
@ -25,7 +25,7 @@ use crate::prelude::*;
|
|||
/// use pagetop::prelude::*;
|
||||
///
|
||||
/// let component = Html::with(|cx| {
|
||||
/// let user = cx.param::<String>("username").cloned().unwrap_or(String::from("visitor"));
|
||||
/// let user = cx.param::<String>("username").cloned().unwrap_or("visitor".to_string());
|
||||
/// html! {
|
||||
/// h1 { "Hello, " (user) }
|
||||
/// }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue