Is there a builtin identity function in Rust?

时间:2017-08-30 20:08:21

标签: rust

I have a vector of ${TEST NAME}s and I want to filter only the Cnames. I use CName = Range("F3").Address ActiveCell.Formula = "=BDP(" & CName & Chr(34) & " cusip" & Chr(34) & ", " & Chr(34) & "security des" & Chr(34) & ")" with identity:

Option

Is there a builtin function permitting to write something like Some?

2 个答案:

答案 0 :(得分:8)

No, there is no such function in stable Rust. You can create your own:

query()

Although most people just inline the code, as you did.

答案 1 :(得分:6)

std::convert::identity开始,有一个Rust 1.33.0函数。