Skip to content

Commit 9218e44

Browse files
committed
Fix initial review
1 parent c2fb70b commit 9218e44

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/librustc/middle/lang_items.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ impl LanguageItems {
7474
}
7575

7676
pub fn require(&self, it: LangItem) -> Result<DefId, String> {
77-
self.items[it as usize].ok_or(format!("requires `{}` lang_item", it.name()))
77+
self.items[it as usize].ok_or_else(|| format!("requires `{}` lang_item", it.name()))
7878
}
7979

8080
pub fn fn_trait_kind(&self, id: DefId) -> Option<ty::ClosureKind> {
8181
match Some(id) {
8282
x if x == self.fn_trait() => Some(ty::ClosureKind::Fn),
8383
x if x == self.fn_mut_trait() => Some(ty::ClosureKind::FnMut),
84-
x if x == self.fn_once_trait() => Some(ty::ClosureKind::FnOnce),
84+
x if x == self.fn_once_trait() => Some(ty::ClosureKind::FnOnce),
8585
_ => None
8686
}
8787
}

0 commit comments

Comments
 (0)