File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -176,7 +176,7 @@ impl Log for AndroidLogger {
176176
177177 let module_path = record. module_path ( ) . unwrap_or_default ( ) ;
178178
179- let tag: & CStr = if let Some ( ref tag) = config. tag {
179+ let tag = if let Some ( tag) = & config. tag {
180180 tag
181181 } else if module_path. len ( ) < tag_bytes. len ( ) {
182182 fill_tag_bytes ( & mut tag_bytes, module_path. as_bytes ( ) )
Original file line number Diff line number Diff line change @@ -191,7 +191,7 @@ pub mod tests {
191191
192192 #[ test]
193193 fn platform_log_writer_init_values ( ) {
194- let tag = c "tag" ;
194+ let tag = CStr :: from_bytes_with_nul ( b "tag\0 " ) . unwrap ( ) ;
195195
196196 let writer = PlatformLogWriter :: new ( None , Level :: Warn , tag) ;
197197
@@ -301,7 +301,7 @@ pub mod tests {
301301 PlatformLogWriter :: new (
302302 None ,
303303 Level :: Warn ,
304- c "tag" ,
304+ CStr :: from_bytes_with_nul ( b "tag\0 " ) . unwrap ( ) ,
305305 )
306306 }
307307}
You can’t perform that action at this time.
0 commit comments