cargo fmt code (#1349)

This commit is contained in:
rongyi 2024-05-08 18:37:38 +08:00 committed by GitHub
parent c4a7966882
commit 56a165bf98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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