فهرست منبع

Fix clippy lint

Jonathan Kelley 1 سال پیش
والد
کامیت
f62af4057f
1فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 6 6
      packages/core-macro/tests/ifmt.rs

+ 6 - 6
packages/core-macro/tests/ifmt.rs

@@ -1,7 +1,3 @@
-#![allow(clippy::all)]
-
-use std::borrow::Borrow;
-
 use dioxus_core_macro::*;
 
 #[test]
@@ -22,8 +18,8 @@ fn formatting_compiles() {
 
     // function calls in formatings work
     assert_eq!(
-        format_args_f!("{x.borrow():?}").to_string(),
-        format!("{:?}", x.borrow())
+        format_args_f!("{blah(&x):?}").to_string(),
+        format!("{:?}", blah(&x))
     );
 
     // allows duplicate format args
@@ -32,3 +28,7 @@ fn formatting_compiles() {
         format!("{x:?} {x:?}")
     );
 }
+
+fn blah(hi: &(i32, i32)) -> String {
+    format_args_f!("{hi.0} {hi.1}").to_string()
+}