2021 day12/rust: fix solution
This commit is contained in:
parent
0220f88e27
commit
2f9adec8ff
1 changed files with 2 additions and 2 deletions
|
@ -45,10 +45,10 @@ fn main() {
|
|||
let p1 = parts.next().unwrap();
|
||||
let p2 = parts.next().unwrap();
|
||||
|
||||
if p2 != "start" {
|
||||
if p1 != "end" && p2 != "start" {
|
||||
map.entry(p1).or_default().insert(p2);
|
||||
}
|
||||
if p2 != "end" {
|
||||
if p2 != "end" && p1 != "start" {
|
||||
map.entry(p2).or_default().insert(p1);
|
||||
}
|
||||
map
|
||||
|
|
Loading…
Reference in a new issue