cargo fmt code (#1349)

pull/1352/head
rongyi 6 months ago committed by GitHub
parent c4a7966882
commit 56a165bf98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,7 +7,7 @@
/* 顶点类型 */ /* 顶点类型 */
#[derive(Copy, Clone, Hash, PartialEq, Eq)] #[derive(Copy, Clone, Hash, PartialEq, Eq)]
pub struct Vertex { pub struct Vertex {
pub val: i32 pub val: i32,
} }
/* 输入值列表 vals ,返回顶点列表 vets */ /* 输入值列表 vals ,返回顶点列表 vets */
@ -18,4 +18,4 @@ pub fn vals_to_vets(vals: Vec<i32>) -> Vec<Vertex> {
/* 输入顶点列表 vets ,返回值列表 vals */ /* 输入顶点列表 vets ,返回值列表 vals */
pub fn vets_to_vals(vets: Vec<Vertex>) -> Vec<i32> { pub fn vets_to_vals(vets: Vec<Vertex>) -> Vec<i32> {
vets.into_iter().map(|vet| vet.val).collect() vets.into_iter().map(|vet| vet.val).collect()
} }

Loading…
Cancel
Save