Skip to content

Commit f974b26

Browse files
generatedunixname893464919433493meta-codesync[bot]
authored andcommitted
Replace regex Captures::get(0).unwrap() with get_match() (#9677)
Summary: Pull Request resolved: facebook/hhvm#9677 Reviewed By: ship-it-ship-it Differential Revision: D87978773 fbshipit-source-id: 4968bd8e44abf18ae0ce8aceb473e37d6152fc3d
1 parent fbb8392 commit f974b26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch-sys/src/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ impl TryFrom<&str> for Device {
305305
.captures(val)
306306
.ok_or_else(|| DeviceParseError::ParserFailure(val.to_string()))?;
307307

308-
if captures.get(0).unwrap().len() != val.len() {
308+
if captures.get_match().len() != val.len() {
309309
return Err(DeviceParseError::ParserFailure(val.to_string()));
310310
}
311311

0 commit comments

Comments
 (0)