diff --git a/2016/day-04/Cargo.toml b/2016/day-04/Cargo.toml index d346d98..b14c314 100644 --- a/2016/day-04/Cargo.toml +++ b/2016/day-04/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" authors = ["Bert Peters "] [dependencies] -regex = "0.1" +regex = "1" diff --git a/2016/day-04/src/main.rs b/2016/day-04/src/main.rs index ea8d45f..671c9ac 100644 --- a/2016/day-04/src/main.rs +++ b/2016/day-04/src/main.rs @@ -73,10 +73,10 @@ fn main() { let door_label = line.unwrap(); let caps = room_pattern.captures(&door_label).unwrap(); - let name = caps.at(1).unwrap(); - let checksum = caps.at(4).unwrap(); + let name = caps.get(1).unwrap().as_str(); + let checksum = caps.get(4).unwrap().as_str(); if is_valid(name, checksum) { - let sector_id = caps.at(3).unwrap().parse().unwrap(); + let sector_id = caps.get(3).unwrap().as_str().parse().unwrap(); cur_sum += sector_id; let decoded: String = name.chars() diff --git a/2016/day-09/Cargo.toml b/2016/day-09/Cargo.toml index 4c7781f..d87eead 100644 --- a/2016/day-09/Cargo.toml +++ b/2016/day-09/Cargo.toml @@ -4,5 +4,5 @@ version = "0.1.0" authors = ["Bert Peters "] [dependencies] -regex = "^0.1" -lazy_static = "^0.2" +regex = "1" +lazy_static = "1" diff --git a/2016/day-10/Cargo.toml b/2016/day-10/Cargo.toml index c43d9c9..e054950 100644 --- a/2016/day-10/Cargo.toml +++ b/2016/day-10/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" authors = ["Bert Peters "] [dependencies] -regex="^0.1" +regex="1"