File tree 2 files changed +3
-3
lines changed
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 {
176
176
177
177
let module_path = record. module_path ( ) . unwrap_or_default ( ) ;
178
178
179
- let tag: & CStr = if let Some ( ref tag) = config. tag {
179
+ let tag = if let Some ( tag) = & config. tag {
180
180
tag
181
181
} else if module_path. len ( ) < tag_bytes. len ( ) {
182
182
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 {
191
191
192
192
#[ test]
193
193
fn platform_log_writer_init_values ( ) {
194
- let tag = c "tag" ;
194
+ let tag = CStr :: from_bytes_with_nul ( b "tag\0 " ) . unwrap ( ) ;
195
195
196
196
let writer = PlatformLogWriter :: new ( None , Level :: Warn , tag) ;
197
197
@@ -301,7 +301,7 @@ pub mod tests {
301
301
PlatformLogWriter :: new (
302
302
None ,
303
303
Level :: Warn ,
304
- c "tag" ,
304
+ CStr :: from_bytes_with_nul ( b "tag\0 " ) . unwrap ( ) ,
305
305
)
306
306
}
307
307
}
You can’t perform that action at this time.
0 commit comments