Closed
Description
I have this code:
r.view_args
.get(name)
.ok_or(format!("{} not given", name))
Clippy reports:
src/app/app_server.rs:259:5: 261:43 warning: use of `ok_or` followed by a function call, #[warn(or_fun_call)] on by default
src/app/app_server.rs:259 r.view_args
^
src/app/app_server.rs:259:5: 261:43 help: for further information visit https://github.com/Manishearth/rust-clippy/wiki#or_fun_call
src/app/app_server.rs:259:5: 261:43 help: try this
src/app/app_server.rs: r.view_args
src/app/app_server.rs: .get(name).ok_or_else(|| $ crate :: fmt :: format ( format_args ! ( $ ( $ arg ) * ) ))
Perhaps Clippy should ignore .ok_or(macro!())
constructs?