Skip to content

Commit 52c0151

Browse files
committed
styles: directory_entry_plus_to_desc_str: split write! to multilines for readablility
1 parent 38ca2ac commit 52c0151

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

clients/filesystem-fuse/src/fuse_api_handle_debug.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,20 @@ fn directory_entry_to_desc_str(entry: &DirectoryEntry) -> String {
358358
/// ```
359359
fn directory_entry_plus_to_desc_str(entry: &DirectoryEntryPlus) -> String {
360360
let mut output = String::new();
361-
write!(output, "{{ inode: {}, generation: {}, kind: {:?}, name: {}, offset: {}, attr: {}, entry_ttl: {:?}, attr_ttl: {:?} }}", entry.inode, entry.generation, entry.kind, entry.name.to_string_lossy(), entry.offset, file_attr_to_desc_str(&entry.attr), entry.entry_ttl, entry.attr_ttl).unwrap();
361+
write!(
362+
output,
363+
"{{ inode: {}, generation: {}, kind: {:?}, name: {}, offset: {}, \
364+
attr: {}, entry_ttl: {:?}, attr_ttl: {:?} }}",
365+
entry.inode,
366+
entry.generation,
367+
entry.kind,
368+
entry.name.to_string_lossy(),
369+
entry.offset,
370+
file_attr_to_desc_str(&entry.attr),
371+
entry.entry_ttl,
372+
entry.attr_ttl
373+
)
374+
.unwrap();
362375

363376
output
364377
}

0 commit comments

Comments
 (0)