We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a76ed88 commit aa909dcCopy full SHA for aa909dc
src/libcore/option.rs
@@ -136,7 +136,7 @@ impl extensions<T: copy> for option<T> {
136
137
Fails if the value equals `none`
138
"]
139
- pure fn expect<T: copy>(reason: str) -> T { expect(self, reason) }
+ pure fn expect(reason: str) -> T { expect(self, reason) }
140
}
141
142
#[test]
src/libstd/map.rs
@@ -232,11 +232,11 @@ mod chained {
232
233
234
fn get(k: K) -> V {
235
- option::get(self.find(k))
+ self.find(k).expect("Key not found in table")
236
237
238
fn [](k: K) -> V {
239
+ self.get(k)
240
241
242
fn remove(k: K) -> option<V> {
0 commit comments