mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-24 09:56:29 +08:00
cargo fmt code (#1349)
This commit is contained in:
parent
c4a7966882
commit
56a165bf98
1 changed files with 2 additions and 2 deletions
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue