Remove needless Cow
This commit is contained in:
parent
c2166ec628
commit
66797fa54f
5 changed files with 12 additions and 26 deletions
|
@ -35,7 +35,6 @@ use rustc_middle::mir::visit::{MutVisitor, MutatingUseContext, PlaceContext, Vis
|
|||
use rustc_middle::mir::*;
|
||||
use rustc_middle::ty::TyCtxt;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::Cow;
|
||||
use std::convert::TryInto;
|
||||
|
||||
pub struct SimplifyCfg {
|
||||
|
@ -57,8 +56,8 @@ pub fn simplify_cfg<'tcx>(tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
|||
}
|
||||
|
||||
impl<'tcx> MirPass<'tcx> for SimplifyCfg {
|
||||
fn name(&self) -> Cow<'_, str> {
|
||||
Cow::Borrowed(&self.label)
|
||||
fn name(&self) -> &str {
|
||||
&self.label
|
||||
}
|
||||
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue