Remove clone_code
method
This commit is contained in:
parent
dc21fcb2fc
commit
05a62c5527
3 changed files with 15 additions and 31 deletions
|
@ -163,13 +163,6 @@ impl<'tcx> ObligationCause<'tcx> {
|
|||
self.code.as_deref().unwrap_or(&MISC_OBLIGATION_CAUSE_CODE)
|
||||
}
|
||||
|
||||
pub fn clone_code(&self) -> Lrc<ObligationCauseCode<'tcx>> {
|
||||
match &self.code {
|
||||
Some(code) => code.clone(),
|
||||
None => Lrc::new(MISC_OBLIGATION_CAUSE_CODE),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn map_code(
|
||||
&mut self,
|
||||
f: impl FnOnce(Lrc<ObligationCauseCode<'tcx>>) -> Lrc<ObligationCauseCode<'tcx>>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue