File tree Expand file tree Collapse file tree 2 files changed +2
-51
lines changed Expand file tree Collapse file tree 2 files changed +2
-51
lines changed Original file line number Diff line number Diff line change 44// @TODO merge with `pub use` & `prelude` in `lib.rs` and `browser::util`?
55
66use crate :: virtual_dom:: { At , Attrs } ;
7- use std:: fmt;
87
98/// Allows to write nested macros.
109///
@@ -488,54 +487,6 @@ macro_rules! nodes {
488487 } ;
489488}
490489
491- pub const fn wrap_debug < T > ( object : T ) -> T
492- where
493- T : fmt:: Debug ,
494- {
495- object
496- }
497-
498- /// A convenience function for logging to the web browser's console. We use
499- /// a macro to supplement the log function to allow multiple inputs.
500- #[ macro_export]
501- #[ deprecated( note = "Use something like https://crates.io/crates/gloo-console instead" ) ]
502- macro_rules! log {
503- { $( $expr: expr) ,* $( , ) ? } => {
504- {
505- let mut formatted_exprs = Vec :: new( ) ;
506- $(
507- formatted_exprs. push( format!( "{:#?}" , $crate:: shortcuts:: wrap_debug( & $expr) ) ) ;
508- ) *
509- $crate:: shortcuts:: log_1(
510- & formatted_exprs
511- . as_slice( )
512- . join( " " )
513- . into( )
514- ) ;
515- }
516- } ;
517- }
518-
519- /// Similar to log!
520- #[ macro_export]
521- #[ deprecated( note = "Use something like https://crates.io/crates/gloo-console instead" ) ]
522- macro_rules! error {
523- { $( $expr: expr) ,* $( , ) ? } => {
524- {
525- let mut formatted_exprs = Vec :: new( ) ;
526- $(
527- formatted_exprs. push( format!( "{:#?}" , $crate:: shortcuts:: wrap_debug( & $expr) ) ) ;
528- ) *
529- web_sys:: console:: error_1(
530- & formatted_exprs
531- . as_slice( )
532- . join( " " )
533- . into( )
534- ) ;
535- }
536- } ;
537- }
538-
539490/// A key-value pairs, where the keys and values must implement `ToString`.
540491#[ macro_export]
541492macro_rules! key_value_pairs {
Original file line number Diff line number Diff line change @@ -277,8 +277,8 @@ impl<Ms> El<Ms> {
277277 _ => false ,
278278 } ;
279279 if script_found {
280- error ! ( "Script tag found inside mount point! \
281- Please check https://docs.rs/seed/latest/seed/app/builder/struct.Builder.html#examples") ;
280+ web_sys :: console :: error_1 ( & wasm_bindgen :: JsValue :: from ( "Script tag found inside mount point! \
281+ Please check https://docs.rs/seed/latest/seed/app/builder/struct.Builder.html#examples") ) ;
282282 }
283283
284284 for child in & self . children {
You can’t perform that action at this time.
0 commit comments