🎨 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
|
@ -17,7 +17,7 @@ async fn component_html_renders_static_markup() {
|
|||
|
||||
#[pagetop::test]
|
||||
async fn component_html_renders_using_context_param() {
|
||||
let mut cx = Context::new(None).with_param("username", String::from("Alice"));
|
||||
let mut cx = Context::new(None).with_param("username", "Alice".to_string());
|
||||
|
||||
let component = Html::with(|cx| {
|
||||
let name = cx.param::<String>("username").cloned().unwrap_or_default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue