#[derive(Debug)]
enum TargetKind {
- Lib, // dylib, staticlib, lib
- Bin, // bin
- Example, // example file
- Test, // test file
- Bench, // bench file
+ Lib, // dylib, staticlib, lib
+ Bin, // bin
+ Example, // example file
+ Test, // test file
+ Bench, // bench file
CustomBuild, // build script
- ProcMacro, // a proc macro implementation
- Other, // plugin,...
+ ProcMacro, // a proc macro implementation
+ Other, // plugin,...
}
impl TargetKind {
label_string,
self.keyword,
between_kwd_cond_comment.as_ref().map_or(
- if pat_expr_string.is_empty() ||
- pat_expr_string.starts_with('\n')
- {
+ if pat_expr_string.is_empty() || pat_expr_string.starts_with('\n') {
""
} else {
" "