match-eq:类似于Rust的match宏,使用PartialEq来“匹配”每个“ patten”

时间:2021-03-15 16:15:15
【文件属性】:
文件名称:match-eq:类似于Rust的match宏,使用PartialEq来“匹配”每个“ patten”
文件大小:13KB
文件格式:ZIP
更新时间:2021-03-15 16:15:15
rust crate rust-library macro rust-crate 匹配当量 Rust 的宏,该宏使用来每个“ ”。 例子 use std :: ffi :: {OsStr, OsString}; assert_eq! ( match_eq! (OsString :: from ( ":party_popper:" ) => { ":jack-o-*:" => 0 , ":rocket:" , ":party_popper:" => - 1 , s = OsStr :: new ( ":party_popper:" ) => { drop :: (s); - 2 } ref s = ":party_popper:" , OsStr :: new ( ":rocket:" ) => { let _: & OsString = s; - 3 } _ = ":party_popper:" => un
【文件预览】:
match-eq-master
----.gitignore(26B)
----README.md(1KB)
----.github()
--------workflows()
--------CODEOWNERS(11B)
--------dependabot.yml(170B)
----COPYRIGHT.md(678B)
----Cargo.toml(555B)
----src()
--------lib.rs(13KB)
----LICENSE.md(16KB)
----.editorconfig(185B)

网友评论