Skip to content

Commit

Permalink
replace map_default with map_or
Browse files Browse the repository at this point in the history
Language change: rust-lang/rust#10854
  • Loading branch information
rlane committed Jan 8, 2014
1 parent acd72c8 commit 9cb86fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() {
];

for &(param, ext, name) in gl_params.iter() {
if ext.map_default(true, |s| {
if ext.map_or(true, |s| {
glfw::extension_supported(s)
}) {
let value = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ impl Monitor {
unsafe {
ffi::glfwGetPrimaryMonitor()
.to_option()
.map_default(Err(()),
.map_or(Err(()),
|ptr| Ok(Monitor { ptr: ptr }))
}
}
Expand Down

0 comments on commit 9cb86fa

Please sign in to comment.