File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ impl eframe::App for MyApp {
41
41
. max_log_length ( 2000 ) // sets maximum log messages to be retained, default is 1000
42
42
// Since we set "show_all_categories" to false in `main`, we should enable some
43
43
// categories to be shown by default.
44
- . enable_category ( "hello" . into ( ) , true )
45
- . enable_category ( "egui_glow::painter" . into ( ) , true )
44
+ . enable_category ( "hello" , true )
45
+ . enable_category ( "egui_glow::painter" , true )
46
46
. show ( ui)
47
47
} ) ;
48
48
}
Original file line number Diff line number Diff line change @@ -222,13 +222,13 @@ impl LoggerUi {
222
222
/// # Panics
223
223
/// Panics if the lock to the logger could not be acquired.
224
224
#[ inline]
225
- pub fn enable_category ( self , category : String , enable : bool ) -> Self {
225
+ pub fn enable_category ( self , category : impl ToString , enable : bool ) -> Self {
226
226
LOGGER
227
227
. lock ( )
228
228
. as_mut ( )
229
229
. expect ( "could not lock LOGGER" )
230
230
. categories
231
- . insert ( category, enable) ;
231
+ . insert ( category. to_string ( ) , enable) ;
232
232
self
233
233
}
234
234
You can’t perform that action at this time.
0 commit comments