avoid full-slicing slices
If we already have a slice, there is no need to get another full-range slice from that, just use the original. clippy::redundant_slicing
This commit is contained in:
@@ -270,7 +270,7 @@ impl<'a, 'b> Context<'a, 'b> {
|
||||
parse::ArgumentNamed(s) => Named(s),
|
||||
};
|
||||
|
||||
let ty = Placeholder(match &arg.format.ty[..] {
|
||||
let ty = Placeholder(match arg.format.ty {
|
||||
"" => "Display",
|
||||
"?" => "Debug",
|
||||
"e" => "LowerExp",
|
||||
|
||||
Reference in New Issue
Block a user